Solution 1:
cat /etc/passwd| cut -b -6
will give you the first 6 characters of each line of /etc/passwd file
You may add a | head -9
to read only the first nine lines.
cat /etc/passwd| cut -b -6
will give you the first 6 characters of each line of /etc/passwd file
You may add a | head -9
to read only the first nine lines.