Please explain what does this command mean?
awk -F'/BaseCalls/' '{print $2}'I know -F tells awk to use(colon) as field separator. and '{print $2}' means print the second field (the fields being separated by :)
Is it trying to read the filenames in the /Basecalls/directory or process the files and read data present inside the files in the /Basecalls/ directory.
1 Answer
It says print the second column while the delimiter (field separator) is: '/BaseCalls/'.
-Fmeans field separator, what is going to separate my fields? is it a colon? is it a "x" character or something else? and here we are tellingawkthat the string"/BaseCalls/"is our field separator.
In a file with a content similar to:
foo/BaseCalls/bar
zee/BaseCalls/bazit will print:
bar
bazIf I use it like awk -F:, now it means that my field separator is a colon, which will be used on a data like:
foo:bar
zee:baz