Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
pass 2 input files to awk script
Name: ak12345 Date: January 7, 2003 at 20:34:48 Pacific OS: HP-UX CPU/Ram: ?
Comment:
Hi,
Does anyone know if it's possible to pass 2 files to an awk script. I need to compare the contents of two files.
Name: James Boothe Date: January 8, 2003 at 08:18:49 Pacific
Reply:
awk can read multiple files. See my solution to "Can we do this in UNIX?" about 10 entries below this one. That solution rebuilds one file by pulling matching info from a second file.
I would have to know your requirements better before suggesting an approach.
Summary: ghostdog that's a neat trick. I'll take a shot at explaining it: awk 'FNR==NR{_[++d]=$0;next}{print _[FNR],$4,$5}' file1 file2 First, two definitions: FNR is the input record number of the current ...
Summary: Hi Experts, I want to pass one input to a script. I tried the below command: echo "1" | script.sh arg1 arg2 means script.sh will take two arguments arg1 and arg2. 1 is the input to the script which i...
Summary: I'm afraid my problem needs a bit more tweaking. That's because it needs to accomodate multiple occurances of entities of the same name. If you can possibly help, please take a look at the following...