Guest User

Untitled

a guest
Mar 23rd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. str="I want to abc replace a word abc in a sentence abc of file abc by giving abc specifying a abc multiple abc range to abc the sed abc command abc."
  2.  
  3. str="I want to abc replace a word xyz in a sentence xyz of file xyz by giving abc specifying a xyz multiple xyz range to xyz the sed abc command abc."
  4.  
  5. ( (2<=NR && NR<=4) || (8<=NR && NR<=10) || (12<=NR && NR<=15) || (18<=NR && NR<=20) || (26<=NR && NR<=29) || (...) )
  6.  
  7. sed '-es/abc/xyz/'{8..6} '-es/abc/xyz/'{4..2} <<<"$str"
  8.  
  9. sed '-es/abc/xyz/'{8,6,4,2} <<<"$str"
Add Comment
Please, Sign In to add comment