Advertisement
sergio_educacionit

file_reader.sh

Feb 12th, 2025 (edited)
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.30 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. archivo="/ruta/al/fichero/de/suaurios"
  4.  
  5. # Lista todos los usuarios con uid mayor a 999
  6. while IFS= read -r linea; do
  7.  
  8.         uid=$(echo $linea | cut -d ":" -f 3)
  9.  
  10.         if [ $uid -le 999 ]; then
  11.  
  12.                 continue
  13.  
  14.         fi
  15.         echo $linea
  16.  
  17. done < "$archivo"
  18.  
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement