05-13-2011
mirni,
Thanks for this lesson in coding.
I really appreciate it.
You are right it could be much better, but you know how it is, you start with a begin and end time for one set of log entries and then using copy-paste you add and add in order to end up with an ugly looking piece of code.
Plus the time pressure of someone wanting this data.
Then it is too late to change it.
The data I got from this ugly script however was very valuable for some investigation, so it served its purpose.
But I will listen to your advise and will use your examples as training.
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Is there anyway to get awk to treat multiple delimiters as one? Particularly spaces... (6 Replies)
Discussion started by: peter.herlihy
6 Replies
2. Shell Programming and Scripting
Hi All ,
I have an output value with two columns like this...
Days User
10 A
500 B
1 C
How i can compare the first column value and passing the user name as parameter?
For example :
while read -r days
If (days<=30) ;
then
value=days/30 x100
... (3 Replies)
Discussion started by: EDBGSK
3 Replies
3. Shell Programming and Scripting
Hi -
Trying to take a list of ldap suffixes in a file, run an ldapsearch command on them, then run a grep command to see if it's a match, if not, then flag that and send an email alert.
The list file (ldaplist) would look like -
***********
o=company a
o=company b
***********
**... (7 Replies)
Discussion started by: littlefrog
7 Replies
4. UNIX for Dummies Questions & Answers
I need a script that reads the out put of a command (softwareupdate --list) and will tally up the number of asterisks in the output and tell me how many there were. How do I go about getting my script to treat asterisks as a regular character and not a wildcard or some other operator? (8 Replies)
Discussion started by: glev2005
8 Replies
5. UNIX for Dummies Questions & Answers
Hi everyone!
first of all thank you all for the forum.
My question is, is there a bash or java program, which addresses the existing text in the html that is visible in the web page for editing by another string, eg
name1: flakjsdlñfjas
Name of father: fdfjaksdfjskdfsd
Well it... (1 Reply)
Discussion started by: xavilito
1 Replies
6. Shell Programming and Scripting
I've been finding myself using a log file colorizer written in perl to reformat and colorize the output from many different programs. Mainly, however, I use it to make the output from "tail -f" commands more readable.
The base perl script I use is based on "colorlogs.pl" available from the... (1 Reply)
Discussion started by: rcsteiner
1 Replies
7. Shell Programming and Scripting
awk 'BEGIN{OFS=","} FNR == 1
{if (NR > 1) {print fn,fnr,nl}
fn=FILENAME; fnr = 1; nl = 0}
{fnr = FNR}
/UNUSUAL/ && /\.gz/ ~ /FILENAME/ {nl++}
<'{system ("gunzip -cd FILENAME")}'
END ... (2 Replies)
Discussion started by: SkySmart
2 Replies
8. Shell Programming and Scripting
Hi.
Before I've post this question, I have spent hours looking for the solutions but to no avail. Because I think it is possible but I just don't know what is the right keyword to search for.
Ok, basically what I want to achieve is really simple.
It's just that I don't want to write... (20 Replies)
Discussion started by: aimy
20 Replies