I'm trying to list all the users of my system with "cut" approach but I obtain nothing, any idea?
cat /etc/passwd | cut -d":" -f 1 > user
As it's already mentioned in the comment above the problem is that you redirect your output to the file named
So, possible solutions are:
1) Check the
user file's content.
2) Adjust your command to write it's output to the
user=`cat /etc/passwd | cut -d":" -f 1` echo $user