Search Results

Search: Posts Made By: packetjockey
6,488
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,488
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
6,488
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.
Showing results 1 to 3 of 3

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