Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • 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
languagebash
rm -rf ~/test; mkdir ~/test; cd ~/test
find /stor/work/CCBB_Workshops_1/bash_scripting/fastq -name "*.gz" | xargs ln -sf -t .

...

Code Block
languagebash
cd ~/test
ln -s -f -t . /stor/work/CCBB_Workshops_1/bash_scripting/data/*.txt
cut -f 2 joblist.txt | sort | uniq | wc -l
# there are 1234 unique runs

...