Search Results

Search: Posts Made By: packetjockey
6,469
Posted By m.d.ludwig
The side effect of putting sed inside of the...
The side effect of putting sed inside of the while loop is that the sourcefile is processed for each search/replace pair in the control file. May I suggest:# Args: Control-File Source-File
...
6,469
Posted By DGPickett
Single quotes after sed do not allow variable...
Single quotes after sed do not allow variable expansion, use double. Also, -e not necessary.
6,469
Posted By anurag.singh
awk 'NR==FNR && !/^#|^$/ {a[$1]=$2;next;} NR==FNR...
awk 'NR==FNR && !/^#|^$/ {a[$1]=$2;next;} NR==FNR {next;} {if(a[$1]) $1=a[$1]; print;} Control_file Source_file
Showing results 1 to 3 of 3

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