Search Results

Search: Posts Made By: jontjioe
2,031
Posted By jontjioe
Ahamed, This is awesome! It is exactly what...
Ahamed,

This is awesome! It is exactly what I needed. Thank you so much! So I noticed the weird special characters in the last line too. The file is an excerpt from a well known trace file. It is...
2,031
Posted By jontjioe
Shamrock and Ahamed, Thank you both for your...
Shamrock and Ahamed,

Thank you both for your help!

Shamrock,
I think the code you provided is the same as what I originally tried that only seems to work some of the time:
cat array.txt | awk...
2,031
Posted By jontjioe
Problem counting unique disks/slices
I want to create a unique listing of slices/disks from a large list that will have duplicates. Here is a sample of the input file.

#array.txt
Disk4:\s93
Disk4:\s93
Disk4:\s94...
3,753
Posted By jontjioe
yinyuemi, Maybe I didn't explain it...
yinyuemi,

Maybe I didn't explain it clearly...

For this file:

cat file
0.000 55588
0.000 55592
3.2320 55592
117.964 55596
530.841 55596
928.232 55596
117.964 55600
530.841 55600...
3,753
Posted By jontjioe
yinyuemi, How can I test this? Do I just run...
yinyuemi,

How can I test this? Do I just run this on the same file I have? It looks I have to pass it 4 parameters?
3,753
Posted By jontjioe
Peasant, I tried this but I'm still getting...
Peasant,

I tried this but I'm still getting negative timestamps. Is the inter-arrival calculation happening correctly? It should be interArrivTime=currTime-prevTime (unless currTime is 0...in...
3,753
Posted By jontjioe
Ahamed, That definitely worked for the small...
Ahamed,

That definitely worked for the small sample file I posted! Thanks. However, I am doing this on a very large file and for some reason I am getting negative numbers. I'm guessing it's...
3,753
Posted By jontjioe
awk - find average interarrival times for each unique page
All,

I have a test file as specified below. 1st col is <arrival time> and 2nd col is <Page #>. I want to find the inter-arrival time of requests for each page # (I've done this part already). Once...
6,316
Posted By jontjioe
Ok, I got it working. I split up the problem and...
Ok, I got it working. I split up the problem and I was able to figure it out...just took me a while. Here it is for those who are interested. I left all of the pages instead of just keeping the top...
6,316
Posted By jontjioe
Script to find the top 100 most popular pages
Ok, this is really beyond my scripting skill level so I'm hoping somebody can help me out with this. I have a trace file in the following format:

<timestame> <devicenum> <sector address> <size in...
4,509
Posted By jontjioe
Oh Ok, I didn't understand that at first. It...
Oh Ok, I didn't understand that at first. It works! Thank you!

---------- Post updated at 09:50 PM ---------- Previous update was at 09:24 PM ----------



This also worked! Thank you!
4,509
Posted By jontjioe
Chubler_XL, Sorry I'm not sure but maybe I...
Chubler_XL,

Sorry I'm not sure but maybe I didn't explain it clearly. I will only be doing this on one file at a time. I just listed 2 files as 2 separate examples. I tried using the code you put...
4,509
Posted By jontjioe
awk script to return the middle line number
I need an awk script that returns the 1st field of the line in the middle of a file. For example, if a file I have has 6 lines, I want it to return the 1st field on line number 3. If a file has 7...
1,916
Posted By jontjioe
That worked perfectly! Thank you so much!
That worked perfectly! Thank you so much!
1,916
Posted By jontjioe
AWK - Comparing/Matching/Counting with 2 files
I have 2 files that I want to do some comparing on.

First, I want to find the unique list of devices in file1 and then put them to a new file, file2. I was able to do this without any problem with...
3,409
Posted By jontjioe
This worked perfectly! Thank you!
This worked perfectly! Thank you!
3,409
Posted By jontjioe
Awk - Count instances of a number in col1 and put results in a col2 (new) of diff file
I have 2 files as follows:

filename1: [FileID FileName FileSize]:
6742 /welcome/mundial98_ahf1_404.htm 1020
6743 /welcome/mundial98_ahf1_404.htm 2224
6744 /welcome/mundial_ef1_404.htm 21678...
3,968
Posted By jontjioe
Thank you so much! Both the perl and the...
Thank you so much!

Both the perl and the while read solution worked great! I'll let you know if one runs faster than the other as I will be running this on approximately 1 million lines.
...
1,952
Posted By jontjioe
Wow. 1 line. What can I say? That's awesome....
Wow. 1 line. What can I say? That's awesome. Thanks for your help!
3,968
Posted By jontjioe
Using awk with the date command and escape characters
I have a file that is a log file for web traffic. I would like to convert the timestamp in it to unix time or epoch time.

I am using the date command in conjunction with awk to try to do this....
1,952
Posted By jontjioe
Comparing 2 files with awk and updating 2nd file
file1: (unique files)
1 /pub/atomicbk/catalog/catalog.gif 693
2 /pub/atomicbk/catalog/home.gif 813
3 /pub/atomicbk/catalog/logo2.gif 12871
4 /pub/atomicbk/catalog/sleazbk.html 18338
...
Showing results 1 to 21 of 21

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