notes/os/unix/text/coreutils/samples.txt
Ihar Hancharenka 5dff80e88e first
2023-03-27 16:52:17 +03:00

22 строки
689 B
Plaintext

Super-presentation!!!
Wilson - Unix CommandLine Tools
http://www.slideshare.net/EricWilson4/unix-commandline-tools
cut certain string from all the files and then - sort
$find . -name "mem_*.txt" | xargs -n 1 grep "Unfreed memory bytes: " | sort
$find . -name "mem_*.txt" | xargs -n 1 tail -n 1 | sort
#
# find a file with "102189705pdf"
# -B 1 - print before context (filled by xargs withoun -n 1)
#
$find . -name "mem_*.txt" | xargs head -n 1 | grep "1021897905pdf" -B 1
svn info | grep "^Revision:" | cut -c 11-
# | sed -ne 's/^Revision: //p'
# | awk '/^Revision:/{print $2}'
# | tr -d 'Revison: '