Search Results

Search: Posts Made By: shunya
2,897
Posted By shunya
Awesome Don! You explained each and every line...
Awesome Don! You explained each and every line ... This is very helpful. Thank you!
2,897
Posted By shunya
Hi rdrtx1...this is superb! Can you educate...
Hi rdrtx1...this is superb!

Can you educate me little bit about following lines.

gsub("[^0-9]", "")

if (! c[$NF]) CHR=CHR $NF ","
c[$NF]=$NF
Thank you! for your help
2,897
Posted By shunya
awk to get multiple strings in one variable
I am processing a file using awk to get few input variables which I'll use later in my script. I am learning to script using awk so please advise in any mistakes I made in my code. File sample is as...
1,634
Posted By shunya
Also, would like to add headers as follows. Loc...
Also, would like to add headers as follows.
Loc ID Img Name Ver. Time Complete Time
---------- ------------- ----- ------------------ ...
1,634
Posted By shunya
Hi RUDIC, Thanks for your response but would be...
Hi RUDIC, Thanks for your response but would be better if we can append "Loc (TC) ID" which is "ssfad_fs" in this case. I would prefer to pass it as a variable so that I can use it in the script.
1,634
Posted By shunya
After Removing fields ID,LOC, Total Size, Comp...
After Removing fields ID,LOC, Total Size, Comp Size fields from the input I want unique lines only.
1,634
Posted By shunya
Actually, I don't need ID field ( ID Field has...
Actually, I don't need ID field ( ID Field has hex values like FAD00, BAC76) I don't need those. I want only LOC ID which I can provide as a variable input as well ( awk -v LOC="ssfad_fs" . Also...
1,634
Posted By shunya
awk parsing file
Looking to parse a file to remove the duplicates and get only few fields and uniq rows.



input.tx

Loc (TC) ID : ssfad_fs
Serial : PIC002340098
...
2,557
Posted By shunya
:b:That works like a champ, Thank you RudiC for...
:b:That works like a champ, Thank you RudiC for your help!!:b:

---------- Post updated at 09:25 AM ---------- Previous update was at 09:23 AM ----------

Also, I would like to learn more about...
2,557
Posted By shunya
Hi RudiC, This is throws o/p but does not...
Hi RudiC,

This is throws o/p but does not create a file as expected. This one is awesome. but would you be able to put this o/p in files please. Thank you for all your help.
2,557
Posted By shunya
panz:/tmp> awk 'BEGIN {print srand()}' 1 You...
panz:/tmp> awk 'BEGIN {print srand()}'
1
You have new mail in /var/spool/mail/root
panz:/tmp>
2,557
Posted By shunya
Filtering log file with lines older than 10 days.
Somehow...It creates only one file YOUNGER and dumps everything in that file.

---------- Post updated at 01:48 PM ---------- Previous update was at 01:38 PM ----------

Here is sample file if...
2,557
Posted By shunya
Filtering log file with lines older than 10 days.
Hi RudiC,

I tried your awk but I don't get any O/P.

panz:/tmp> awk 'BEGIN {D10 = (srand()-864000); split ("OLDER YOUNGER", FN)} {print $0 > (FN[1+($2/1E9 > D10)])} ' 0108.txt


----------...
2,557
Posted By shunya
Filtering log file with lines older than 10 days.
Hi,
I am trying to compare epoch time in a huge log file (2 million lines) with todays date. I have to create two files one which has lines older than 10 days and another file with less than 10...
5,676
Posted By shunya
Appreciate your help rovf
Appreciate your help rovf
5,298
Posted By shunya
That is wonderful, Corona!! It works for me....
That is wonderful, Corona!! It works for me. Thanks for your help.
5,298
Posted By shunya
Hi Andrew, Your method works only if there...
Hi Andrew,

Your method works only if there is only file format filtering. I also need to rename the o/p file base on HNAME. HNAME=`grep -i hostname ${OPFILE} |awk '{print $NF}'`Not sure if we can...
5,298
Posted By shunya
Monitoring processes in parallel and process log file after process exits
I am writing a script to kick off a process to gather logs on multiple nodes in parallel using "&". These processes create individual log files. Which I would like to filter and convert in CSV...
5,676
Posted By shunya
This is what I am using now and it doesn't...
This is what I am using now and it doesn't timeout now and I get complete logs in O/P. sleep 1
expect {
timeout {send "\r"; exp_continue}
"SA@*## "
}
5,676
Posted By shunya
Expect script to collect logs in expert mode
I am trying to collect logs from a system in expert mode. Where I login to system and then change mode to expert mode and issue command to collect the log. I have a script which works but It waits...
1,469
Posted By shunya
Thanks for your help RudiC
Thanks for your help RudiC
1,469
Posted By shunya
Hi RudiC, Please my attempts below 1st...
Hi RudiC,

Please my attempts below

1st attempt:

cat filename99 |awk '{
if (NF > 13)
print $0 |cut -f 1 -d '
else
print $0
}'


I get following o/p

HEX ID Name ver FLRGT...
1,469
Posted By shunya
awk Selective printing of fields
Hi Gurus,

I have following input file. I tried multiple awk combinations to print selected columns without success.


HEX ID Name ver FLRGT Start Time Total Shared...
2,003
Posted By shunya
Thank you Don and RudiC, Both of these codes...
Thank you Don and RudiC,

Both of these codes work like charm.
2,003
Posted By shunya
Hi Don, Thanks for the response. I would...
Hi Don,

Thanks for the response. I would like to keep the comma at the end. Appreciate your help.

---------- Post updated at 05:00 PM ---------- Previous update was at 04:59 PM ----------

I...
Showing results 1 to 25 of 29

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