Ronald Robertson

Sanjay Singh

Scientist/Writer
  • Emailsanjaysingh765@gmail.com
  • Socail@lampatlex
  • VisitorSince 1982
  • LocationKentucky, USA



Examples For Sed Linux Command In Text Manipulation and File Handling







Click on red strip to expand it









1. Replace all occurrence









2. Replace all occurrence of multiple string









3. Reading sed commands from a file










4. Substituting Flags: to control the replacement in file







Extract Part of a FASTA Sequences with Position by python script HERE








5. Limiting sed in a file













6. Delete Lines in a file with sed




sed '2d' Inputfile  >Outfile

- following command will delete second and third line


sed '2,3d' Inputfile  >Outfile

- following command will delete second line to the end of the file.

sed '2,$d' Inputfile  >Outfile





Comments