Please enable JavaScript.
Coggle requires JavaScript to display documents.
Unix (awk ($1 is the first field, $0 is the whole field, $NF is the last…
Unix
awk
$1 is the first field, $0 is the whole field, $NF is the last field, NF is the number of field on the line
-
in these instances, the evaluation command is surrounded by ordinary ( and ) brackets inside the quotes.
the command have curly bracket inside the quote '{ }' and the evaluation command is inside of ( )
Curly brackets { } for the action, ordinary ( ) brackets for the evaluation.
awk '{FS="\t"; OFS="_"; if($3 == "foobar1"){print $1,$2,$3;}}' file1 do not forget the format
-
file1 > file2 means input is file1, output is file2
-
awk 'BEGIN{FS="\t";} if(substr($3,1,3) == "Uni"){print $1;} }'file1 >> file2 the third field the 1,3 characters
-
-
cut
the separator default is tab, -d
-
-
-
date
-
-
or set format for the date, like date '+ The day is %d/%m/%y, the time is %H/%M/%S.'
-
cat
can open the file on the screen, and use zcat to open the zip file
-
cp
cp -r dir1 dir2
recursively copies the directory dir2, together with its contents and subdirectories, to the directory dir3.
-
-
-
-
-
-
-
-
-
-