I am having two set of files with different number of columns and rows.
A set of files have only single row with 20 columns.
B set of files have 1000s of rows with 5 columns.
both set contains equal number of files.
I want to save all the 20 columns of A in variables one by one and then compare it with 5th column of set B files. If it matches....it should print the 4th column of set B files.
Hi radoulov,
Thanks for ur interest.
sample files are:
A files sample :
B files sample :
I want to check if first field (i.e, 3.764724 ) == 5th column && 2nd column =="BBM" then
echo col4th of B files.
Likewise, I need to check it for every variable of A files from every corresponding B files.
Thanx
Last edited by Franklin52; 05-20-2011 at 03:02 AM..
Reason: Please use code tags
I have tried ur code. It works well
But it shows output only for a single A file and its corresponding single B file.
Now, I need to run it for multiple files and save their data into new file.
I tried the following code, but it doesnt work
f
thanks for the help!!!!
---------- Post updated at 07:40 AM ---------- Previous update was at 06:04 AM ----------
Hi ygemici,
code given by you also works for single A file and single B file.
the output shown is :
Although I need to display only RGF
Kindly help me to work with multiple files at a time.
Last edited by radoulov; 05-20-2011 at 11:12 AM..
Reason: Code tags, please!
This is the sample json I have pasted here. I want all the IP address strings to be converted into an array. For example "10.38.32.202" has to be converted to everywhere in the JSON. There are multiple IPs in a JSON I am pasting one sample object from the JSON. But the IPs already in an Array... (11 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
This is what is asked:
If the user enters ‘3’, prompt the user for two file names. Verify that the file names... (2 Replies)
hi
My script as below
#!/bin/ksh
for i in `seq 1 7`
do
a=$(awk '{print $i}' /home/rama/expenese.txt)
done
for i in `seq 1 7`
do
echo "${a}"
done
content of expense.txt is as below
5032 210179 3110 132813874 53488966 11459221 5300794
I want output as... (6 Replies)
Hi,
I have general question: i have good working Perl script with .pl extension, and now I have to migrate all to another Linux box, and I was told that I can use only shell scripting, so I'm not sure how different those two things are, will it work without any changes . Is there anything smart I... (6 Replies)
In shell Can I pass " to a program ? If not what is the work around ..?
Can I define * as a wild card charecter that will return all the values from
the files ..?
I am trying to create a tool that will return the values from a property file . This tool has to support all the wild card... (1 Reply)
I want to learn Linux/Unix shell scripting, I searched this forum but got some results for Unix Admin books and general Linux books.
Would someone recommend a good Linux Shell Scripting book?
I did order one book
A Practical Guide to Linux(R) Commands, Editors, and Shell Programming ... (4 Replies)
Please Let me know this Que and Ans please Because i applied for a H1B VISA nad i have a INTERVIEW as soon so please "Difference between Linux and Unix and also C and C++ and also about Shell Scripting about all Questions and Answers ." (3 Replies)
Anyone here knows any reasonably priced courses for independent (not corporate) users that can point me to. Already know Unix commands/vi/etc but now need scripting too. Any replies will be appreciated. (2 Replies)