...
Code Block | ||
---|---|---|
| ||
cd; rm -f test/*.* ln -s -f -t test~test ~/workshop/data/*.txt ls -l |
...
- find returns a list of matching file paths on its standard output
- the paths are piped to the standard input of xargs
- xargs takes the data on itsĀ standard input and calls the specified function (here ln) with that data as the function's argument list.
Code Block | ||
---|---|---|
| ||
cd; rm -f test/*.* find ~/workshop/ -name "*.txt" | xargs ln -s -f -t ~/test |
sort & uniq tricks
The ~/test/joblist.txt file you just symlink'd describes sequencing job/run pairs, tab-separated. We can use sort and uniq to collapse and count entries in the run name field (column 2):
...