10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to use awk to find all the $2 values in file2 which is ~30MB and tab-delimited, that are between $2 and $3 in file1 which is ~2GB and tab-delimited.
I have just found out that I need to use $1 and $2 and $3 from file1 and $1 and $2of file2 must match $1 of file1 and be in the range... (6 Replies)
Discussion started by: cmccabe
6 Replies
2. Shell Programming and Scripting
Hi everyone,
I would like to complete the following could you please find some time and help me to achieve below:
File 1 has a list of IP address (more than 1k)
File1:1.1.1.1
2.2.2.2
1.1.1.2
3.3.3.3
2.3.3.2File 2 has content like this:Internet 11.165.91.244 0 Incomplete ... (4 Replies)
Discussion started by: redred
4 Replies
3. UNIX for Dummies Questions & Answers
I want to print only the lines in file2 that match file1, in the same order as they appear in file 1
file1
file2
desired output:
I'm getting the lines to match
awk 'FNR==NR {a++}; FNR!=NR && a' file1 file2
but they are in sorted order, which is not what I want:
Can anyone... (4 Replies)
Discussion started by: pathunkathunk
4 Replies
4. UNIX for Dummies Questions & Answers
Platform : Oracle linux 6.5
I have two log files with the following contents
# ls -l
total 8
-rw-r--r--. 1 root root 75 Dec 10 20:55 myLogfile1.log
-rw-r--r--. 1 root root 51 Dec 10 20:57 myLogfile2.log
#
# cat myLogfile1.log
hello world
jaded zombies acted quaintly but kept driving... (9 Replies)
Discussion started by: kraljic
9 Replies
5. Shell Programming and Scripting
I'm trying to use awk to do the following. I have file1 with many lines, each containing 5 fields describing an individual set. I have file2 which is a template config file with variable space holders to be replaced by the values in file1. I would like to substitute each set of values in file1 with... (6 Replies)
Discussion started by: msmehaffey
6 Replies
6. UNIX for Dummies Questions & Answers
I have very limited coding skills but I'm wondering if someone could help me with this. There are many threads about matching strings in two files, but I have no idea how to add a column from one file to another based on a matching string.
I'm looking to match column1 in file1 to the number... (3 Replies)
Discussion started by: pathunkathunk
3 Replies
7. Shell Programming and Scripting
Hi
I started to learn bash a week ago. I need filter the strings from the last column of a "file2" that match with a column from an other "file1"
file1:
chr10100036394-100038350AK077761
chr10100041065-100046547AK032226
chr10100041065-100046547AK016270
chr10100041065-100046547AK078231
...... (6 Replies)
Discussion started by: geparada88
6 Replies
8. Shell Programming and Scripting
Hello, I am new to shell scripting and i need to create a script with the following directions and I can not figure it out.
Create a shell script called newest.bash that takes two filenames as input arguments ($1 and $2) and prints out the name of the newest file (i.e. the file with the... (1 Reply)
Discussion started by: mandylynn78
1 Replies
9. UNIX for Dummies Questions & Answers
file1 has pgap500 500
file2 has bunch of data
cat file1 file2 > file3
cp file2 file3.dat then vi pgap500 500 onto 1st line
compare file3 and fil3.dat, they are not the same.
any idea ? the 1st line, i want to put pg500 xxx
---------- Post updated at 07:35 AM ---------- Previous... (2 Replies)
Discussion started by: tjmannonline
2 Replies
10. UNIX for Dummies Questions & Answers
Hi Guru's,
I need to create 3 files with the contents "ABC" using single command.
Iam using:
echo "ABC" > file1.txt file2.txt file3.txt
the above command is not working. pls help me...
With Regards / Ganapati (4 Replies)
Discussion started by: ganapati
4 Replies