Created
March 11, 2011 18:48
-
-
Save vvondra/866355 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# nactu prezencky | |
for f in $@ | |
do | |
cat $f >> tempprezencka | |
done | |
# zjistim unikatni jmena | |
cat tempprezencka | sort | uniq > tempprezencka2 | |
rm tempprezencka | |
# setrim cast nactenim hesel | |
getent passwd > passwdlist | |
while read line | |
do | |
grep $line passwdlist | cut -d: -f1 >> tempprezencka | |
grep $line passwdlist | cut -d: -f5 >> tempprezencka3 | |
done < tempprezencka2 | |
# slepim jmena a loginy dohromady | |
paste tempprezencka tempprezencka3 -d" " > tempprezencka2 | |
cat tempprezencka2 | |
#uklid | |
rm tempprezencka tempprezencka2 tempprezencka3 passwdlist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment