Search Results

Search: Posts Made By: packetjockey
6,514
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,514
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,514
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 10:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy