Thursday, March 23, 2017

Bash: sed - part IV


Grouping commands

$ cat sed1

#!/bin/bash
#
sed '2{
s/fox/elephant/
s/dog/cat/
}'  data1a.txt







$ ./sed1The quick brown fox jumps over the lazy dog
The quick brown elephant jumps over the lazy cat
The quick brown fox jumps over the lazy dog
The quick brown fox jumps over the lazy dog

No comments:

Post a Comment