Search Results

Search: Posts Made By: amarn
1,647
Posted By amarn
Thank you Corona, it worked just perfect!...
Thank you Corona, it worked just perfect! However, now I need to do this process for a bunch of *.pcap.gz files and I'll try to integrate your suggestion in a shell script. Cheers!
1,647
Posted By amarn
Passing resulted string name of a gzipped file as an argument to another piped tool
Hi,

I have a .pcap.gz file and I would like to initially gzip it and then pass the resulting .pcap filename as an argument to a piped tool; the right-hand tool is not standardized linux tool but a...
5,199
Posted By amarn
this helped a lot, thank you again!
this helped a lot, thank you again!
5,199
Posted By amarn
thanks Yoda! It worked...now found 277 new...
thanks Yoda! It worked...now found 277 new records! Anyhow, just out of curiosity, what was the reason I was obtaining only 67 instances from the previous code? It would be great if you can...
5,199
Posted By amarn
Compare the second column of a file with the second column of another in awk
Hi,

I know that this topic has been discussed in the past and I've tried to follow all the guidelines. Anyhow, I following describe my problem.

I have a file (file1 , no. records = 67)...
4,432
Posted By amarn
dear tukuyomi, i'm following exactly what you...
dear tukuyomi, i'm following exactly what you wrote and still i get only the column of $1 from file 2

akm@snoopy:~/temp$ awk 'NR==FNR{A[$1]=$2;next}$0=$1 OFS A[$1]' file2 file1 > file3...
4,432
Posted By amarn
thank you tukuyomi, however the code you gave me...
thank you tukuyomi, however the code you gave me produces only the the first column of file2 and does not go through the comparison...

just to inform that file1 has 2000 unique records and file2...
4,432
Posted By amarn
it does not produce any output...just for the...
it does not produce any output...just for the record, i'm on ubuntu
4,432
Posted By amarn
thanks ahamed, unfortunately, i've tried it and...
thanks ahamed, unfortunately, i've tried it and it doesn't work.
4,432
Posted By amarn
Comparing two columns from two different files
Hi,

I have a single-column file1 having records like:

00AB01/11
43TG22/00
78RC09/34
......
......

and a second file , file 2 having two columns like

78RC09/34 1
45FD11/11 2...
2,079
Posted By amarn
Dear Corona, You are right, i should mention...
Dear Corona,

You are right, i should mention it next time:) Thanks for your help.
Also thanks to Chubler_XL, the loop worked perfectly fine!

cheers!
2,079
Posted By amarn
ok, for example, the client_hour_1.txt is...
ok,

for example, the client_hour_1.txt is composed by clientIDs formatted as below:



the hour_1.txt contains some stats for each of the clients in the previous file and looks like:


...
2,079
Posted By amarn
Hi Corona and thank you for your quick response ...
Hi Corona and thank you for your quick response

Let me elaborate a bit more on it.
For instance:

the hour_1/clients_hour_1.txt is a single-column file with 700 records (i.e. 700 lines...
2,079
Posted By amarn
pasting two files in every directory (+100 directories)
Hi,

I have around 400 directories each one named as hour_1/ , hour_2/ .....hour_400/ and each of these contains two files, namely:

File1: hour_1.txt (in hour_1/) , hour_2.txt (in hour_2/)...
2,962
Posted By amarn
Well it seems you guessed correctly, i had a file...
Well it seems you guessed correctly, i had a file that was changing because it was still capturing a DSL trace. All fixed now! :) Thanks for your quick reply!
2,962
Posted By amarn
Concatenate more than 200 files
Hi,

I have a bunch of files (around 500) with the .log extension and each having a different name. Is there an easy way to concatenate them all into a single file?
I've tried:

cat *.log >...
10,514
Posted By amarn
Dear both, it worked perfectly fine! Thank you! ...
Dear both, it worked perfectly fine! Thank you!

I've also successfully employed the second awk command within a second while-do-done that is performed after a new find search, the code is as...
10,514
Posted By amarn
the latest code im running after your suggestion...
the latest code im running after your suggestion is (execAWK.sh) :

this script is placed in /home/tester/datasets/

where the /home/tester/datasets_26_10_11/ contains all the hour_*/...
10,514
Posted By amarn
Hi CarloM, I've tried that as well (by...
Hi CarloM,

I've tried that as well (by having my shell script outside the hour_1/ directory) and i get an error for all the cust_*.txt files - this is why i put cust_xxxx.yyyy.txt) :

awk: cmd....
10,514
Posted By amarn
Dear both thank you for your help , i've tried...
Dear both thank you for your help , i've tried both your approaches, unfortunately none works

based on vgersh99

#!/usr/bin/sh

set -xv

find /home/tester/datasets_26_10_11/hour_1/ -name...
10,514
Posted By amarn
Hi, I've been going through some...
Hi,

I've been going through some trial-error procedures...

basically :


!usr/bin/sh

set -xv

find /home/tester/datasets_26_10_11/hour_1/ -name "cust_*.txt" -type f | \


while read...
10,514
Posted By amarn
Thank you to both CarloM and felipe.vinturin! The...
Thank you to both CarloM and felipe.vinturin! The first part works fine, but the last two awk commands seem to not find the requested files. The first command successfully generates all the...
10,514
Posted By amarn
Hi, It seems that the problem occurs due to...
Hi,

It seems that the problem occurs due to the fileBaseName and fileDirName...they don't actually hold any values and i'm keep getting the error:



are these variables embedded and globally...
10,514
Posted By amarn
thank you again felipe.vinturin for your quick...
thank you again felipe.vinturin for your quick response

I had (and still have your code severely in mind) but if i use the find<Path> part wouldn't this need to be iterated through a loop in order...
10,514
Posted By amarn
perform 3 awk commands to multiple files in multiple directories
Hi,

I have a directory /home/datasets/ which contains a bunch (720) of subdirectories called hour_1/ hour_2/ etc..etc.. in each of these there is a single text file called (hour_1.txt in hour_1/ ,...
Showing results 1 to 25 of 35

 
All times are GMT -4. The time now is 09:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy