SED Real Life Examples

sed ‘s/pdf./pdf/’ proposalPackage — removed character from pdf to end of line

sed ‘s/(.)/”\1″/g’ proposalPackage — put line in ” “

while read line; do for i in {1..2}; do echo “$line”; done; done < stagingattachement.txt > newfile —- copy line to itself

sed ‘s/^/copy -keep /’ — insert copy in start of line for all line

Leave a Reply

Your email address will not be published. Required fields are marked *