Search Results

Search: Posts Made By: tsu3000
5,446
Posted By RudiC
Actually, thinking twice, it is. Try sed...
Actually, thinking twice, it is. Try sed 's/\(efgh\[\)\([[:digit:]]\)\(\].yyzz=bbbbb\)/\1\2\3\nabcd[0].efgh[\2].wwxx=aaaaa\nabcd[0].efgh[\2].xxxx=blah/' file
abcd[0].efgh[0].wwxx=aaaaa...
1,680
Posted By Akshay Hegde
OR $ awk -F':|#.*' '{$1=$1}1' file
OR

$ awk -F':|#.*' '{$1=$1}1' file
1,680
Posted By bartus11
Sed is a more appropriate tool for this task in...
Sed is a more appropriate tool for this task in my opinion:
sed 's/ *#.*//;s/:/ /g' file.txt
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 03:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy