sed

eagarthóir sruth do scagadh agus athrú téacs

chóipeáil
91
21
echo this is a test | sed 's/a/my/'

sonraí |

chóipeáil
59
13
echo this is not a test | sed -e 's/not //' -e 's/test/another test/'

sonraí |

chóipeáil
41
12
sed '/test/ !d' myfile

sonraí |

chóipeáil
33
13
echo test12345 | sed 's/\([a-z]*\).*/\1/'

sonraí |

chóipeáil
27
3
dd if=/dev/sda | sed 's/Marry/Sally/g' | dd of=/dev/sda

sonraí |

chóipeáil
26
7
sed '3a Text to append' myfile

sonraí |

chóipeáil
19
2
cat myfile.txt | sed 5q

sonraí |

chóipeáil
17
6
echo "54321 test" | sed 's/[0-9]*/& &/'

sonraí |

chóipeáil
16
3
sed '/test/ d' myfile

sonraí |

chóipeáil
16
4
sed '1,/^$/ d' myfile

sonraí |

chóipeáil
14
0
echo hi | sed 's/\(h\)\(i\)/\2\1/g'

2 bliain, 4 mhí ó shin examplenow 1 | sonraí |

chóipeáil
11
2
1,$s/\(^.*$\)/#\1/

3 mhí, 1 seachtain ó shin kxdemon 2 |

chóipeáil
10
1
sed -i "" 's/find/replace/g' views.py

1 bliain ó shin george 3 |

chóipeáil
9
2
sed '1,3 d' myfile

sonraí |

chóipeáil
5
0
sed -i 's/test/NewSTR/g' myfile

2 bliain, 4 mhí ó shin john2 0 | sonraí |

chóipeáil
4
0
echo hi | sed 's/i/sometext&&&&&&&/'

2 bliain, 4 mhí ó shin examplenow 1 | sonraí |

chóipeáil
2
0
sed -i 's/foo/bar/g'

1 bliain ó shin examplenow 1 |

chóipeáil
0
0
zipinfo -T storage | sort -nr -k 7 | sed 15q

foinse | sonraí |