Sed command Linux
I have a home work assignment to develop in Perl sed command, but in order to do it first I need to understand what it does. And is sed part of Linux commands?
Please explain what the following lines do:
sed '/abc/' <old >new - match abc
sed s/day/night/ old >new
echo Sunday | sed 's/day/night/'
sed 's/\/usr\/local\/bin/\/common\/bin/' <old >new (Slash delimiter)
sed 's/loop/loop the loop/g' <old >new - Global replacement
sed 's/loop/loop the loop/g' <old >new - Global replacement, Ignore case
sed 's/[a-zA-Z]* //2' <old >new - Delete the regexp match from the second match.
I have a home work assignment to develop in Perl sed command, but in order to do it first I need to understand what it does. And is sed part of Linux commands?
Please explain what the following lines do:
sed '/abc/' <old >new - match abc
sed s/day/night/ old >new
echo Sunday | sed 's/day/night/'
sed 's/\/usr\/local\/bin/\/common\/bin/' <old >new (Slash delimiter)
sed 's/loop/loop the loop/g' <old >new - Global replacement
sed 's/loop/loop the loop/g' <old >new - Global replacement, Ignore case
sed 's/[a-zA-Z]* //2' <old >new - Delete the regexp match from the second match.
No comments:
Post a Comment