Search Results

Search: Posts Made By: leaf
1,893
Posted By sk1418
alternative awk '{print...
alternative
awk '{print $2;if($2~/H/){gsub(/H/,"M",$2);print $2;}}' yourFile|nl -nln
1,893
Posted By ahamed101
sed is the main part in your script and it will...
sed is the main part in your script and it will only replace H with M.
Also, if there is only one file, you don't need the for loop.


awk '{print ++i" "$2}/H/{$0=$2;gsub(/H/,"M");print ++i"...
Showing results 1 to 2 of 2

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