sed

mkondo mhariri wa kuchuja na kubadilisha Nakala

nakala
94
21
echo this is a test | sed 's/a/my/'

maelezo |

nakala
61
13
echo this is not a test | sed -e 's/not //' -e 's/test/another test/'

maelezo |

nakala
43
12
sed '/test/ !d' myfile

maelezo |

nakala
6
0
echo hi | sed 's/i/sometext&&&&&&&/'

8 miaka, miezi 8 zilizopita examplenow 1 | maelezo |

nakala
32
7
sed '3a Text to append' myfile

maelezo |

nakala
21
2
cat myfile.txt | sed 5q

maelezo |

nakala
19
4
sed '1,/^$/ d' myfile

maelezo |

nakala
17
6
echo "54321 test" | sed 's/[0-9]*/& &/'

maelezo |

nakala
5
0
sed -i 's/test/NewSTR/g' myfile

8 miaka, miezi 8 zilizopita john2 0 | maelezo |

nakala
14
0
echo hi | sed 's/\(h\)\(i\)/\2\1/g'

8 miaka, miezi 8 zilizopita examplenow 1 | maelezo |

nakala
12
1
sed -i "" 's/find/replace/g' views.py

7 miaka, miezi 4 zilizopita george 4 |

nakala
9
2
sed '1,3 d' myfile

maelezo |

nakala
33
13
echo test12345 | sed 's/\([a-z]*\).*/\1/'

maelezo |

nakala
16
3
sed '/test/ d' myfile

maelezo |