↧
Answer by Henning Kockerbeck for Prevent sort from sorting filenames instead...
You need to tell sort which part of its input you want to sort after. That's what the switch -k (for "key") is for. Let's say you have a list like/file3 111/file2 666/file1 333You want to sort after...
View ArticlePrevent sort from sorting filenames instead of greped content
In a script, I want to get a variable from find grep and sort to display it with echo on screen. The variable looks like:OUTPUT="$(find . -maxdepth 2 -type f -name 'filename' | xargs grep -o -m 1...
View Article
More Pages to Explore .....