Tools and Advanced Commands
Emanuele Valea <valea@lirmm.fr> LIRMM CNRS / Université de Montpellier
Tools and Advanced Commands Emanuele Valea <valea@lirmm.fr> - - PowerPoint PPT Presentation
Tools and Advanced Commands Emanuele Valea <valea@lirmm.fr> LIRMM CNRS / Universit de Montpellier Outline Advanced commands: find grep tar, gzip, gunzip Filters: sort cut sed Outline Advanced
Emanuele Valea <valea@lirmm.fr> LIRMM CNRS / Université de Montpellier
Caveat: put the pattern between ‘...’ when using regular expressions
pattern
comparisons.
separated by NEWLINE characters
(first line is 1)
Any character
begin of line
end of line
repetition (0 or plus)
repetition (1 or plus)
Any character inside ‘[ ]’
Any character except those inside the ‘[ ]’
begin of the word
end of the word
beginning of the line
end of the line
create a new tarfile
specify the tarfile name
verbose
Extract files from the tarfile
Check the tarfile
Specify the tarfile name
Verbose
comparisons
instead of the standard output
field separator
during sorting, in the format:
the field delimiter character (-d option)
replace only num occurrences
replace all the occurrences
print the replaced
1,1 { s/^/Begin:/ s/$/ -- End/ } /\/\*.*\*\// d
1,1 { s/^/Begin:/ s/$/ -- End/ } /\/\*.*\*\// d One Two Three A B C /* Comment */
1,1 { s/^/Begin:/ s/$/ -- End/ } /\/\*.*\*\// d One Two Three A B C /* Comment */ Begin: One Two Three -- End A B C
begin with '#') cat $FILE | sed -e '/^#/d‘
cat $FILE | sed -n "/^[0-9]/ p“
cat $FILE | sed "/^[0-9]/ d“
cat $FILE | sed -e "/^$/d"