Sample Header Ad - 728x90

Loop over users problem

0 votes
2 answers
137 views
I am struggling with a loop over users id, i want to list all the users in /etc/passwd whose id are greater than 999, it doesn't recognize my if .. fi sentence and it is important to say that I am working with the minimal installation so I don't have commands as 'awk', this is my actual code cat /etc/passwd | while IFS=: read name pass uid gid geos home; do if [$uid > 999]; then echo $name di done; I have also tried with -gt but it does't work either
Asked by Sebastian Rojas (3 rep)
Sep 6, 2022, 07:16 PM
Last activity: Sep 6, 2022, 08:28 PM