Bash: Changing a specific line in a file, to something which includes the line -
i'm trying change file this:
hello name [bob] age 34 should turn into:
hello name [bob]sometext[bob]sometext age 34 however, make easier, know 'string' i'm looking start [bo
any appreciated, if need more info, :)
if don't need use bash only, can use sed:
sed 's/\[bo.*/&sometext&sometext/g' filename output:
hello name [bob]sometext[bob]sometext age 34
Comments
Post a Comment