(no title)
jfhufl | 7 years ago
cat /etc/passwd | grep root | awk -F: '{print $3}'
ruby -e 'puts File.read("/etc/passwd").lines.select { |line| line.match(/root/) }.first.split(":")[2]'
A little more verbose, but the idea is the same.https://alvinalexander.com/scala/fp-book/how-functional-prog...
anthk|7 years ago