I'm a newbie to perl and not much of a coder in general, but I must use it at my new task at work. I have two text files that are several hundred MBs large. I need to pull in data from a column in file 2 into file 1. Basically, file 2 is the lookup table and I can key off the unique id column that they both share.
Hi,
I have 1000 text files in a folder that are labeled data1.txt all the way to data1000.txt. I want to write a small script that manipulates the text files in this way:
(1) cut the 2nd and 9th columns of the text files
(2) sort by the numerical value in the 9th column
(3) then save the rows where the value in the 9th column is greater than 0.001 in a file that is called newdata*txt.
Hi,
I just typed in this program from my PHP book:
$variable=20 ;
do {
echo "The do...while loop says \$variable = ", $variable, "<br>" ;
}
while ($variable < 10) ;
...
I have a two files, file A and B, which have 5 columns, and each 5 columns are made up of random numbers, that means, numbers are all different.
can i use the value of one variable to generate a name for another variable?
for example i want to use the counter from a "do while" loop to name and define a variable each time the loop executes. for example
objectnames1=`ls -a`
objectnames2=`ls -a`
etc.
How can I obtain a value from inside a for loop?
Hi, I am trying to multiply column#1 with column#2 using a shell script. How can I make a for-loop script using 1st column as "i" and the second column as "j" from the following file?
Hi all, I'm needing help again on scripting.
Hi Guys,
Can anyone of you please tell me how to use a variable inside a awk command.
For ex - if am printing the third column with respect to a pattern with delimiter ~
Code:
awk -F~ '$3=="pattern"' <file name>
- This works,
Now here I have a set of patterns in a file and I want to put it in the loop. But awk does nt recognize it.