10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi guys,
Hope someone can help me with this - I'm sure it's fairly simple but it's driving me mad! (forgive the coding - still new on scripting - come from Windows)
I have the following coding for checking whether I want to include a line in a file:-
EXTRACT_Date=$(date --date="${PERIOD}"... (6 Replies)
Discussion started by: NickF
6 Replies
2. Shell Programming and Scripting
Hello, I have an input file that looks like so:
LDLR
LDLRAD4
VLDLR
when I grep "LDLR" I get an output of:
LDLR
LDLRAD4
VLDLR
Since all names have "LDLR" included within them, but all I want the output to be is
LDLR
I know it can work if I surround the words with pipes for... (5 Replies)
Discussion started by: Rabu
5 Replies
3. Shell Programming and Scripting
Hi there,
I need to grep out 1 line of a changing file. Any help would be much appreciated.
code:
xterm -hold -e tail -f /var/lib/dhcp3/dhcpd.leases | grep client-hostname &>/dev/null &
The trouble is it shows the contents of the entire lease file.
I just want to show the line... (5 Replies)
Discussion started by: digitalviking
5 Replies
4. Shell Programming and Scripting
hallow all i have question about awk i want indexing last key (in BOLD number)
ex: input.txt
1
252468812
52468812
1281268819
1252468812
1252468923
468812
1252468812
so output will like this
output text
1:252468812
2:52468812
4:1252468812
6:468812
7:1252468812
output get... (8 Replies)
Discussion started by: zvtral
8 Replies
5. Shell Programming and Scripting
The below command is not working
stackmem="$(pmap $1 | grep -i '' | awk '{print $2}'| tr -d ' K')"
I need to grep strictly for ---->
Regards,
Mohtashim (2 Replies)
Discussion started by: mohtashims
2 Replies
6. Shell Programming and Scripting
Hi,
I am using NS2 and i need to filter a trace file (part of which is shown below):
- 33.91576 2 3 tcp 1040 ------- 1 0.0 4.0 1115 2258
r 33.918907 4 3 ack 40 ------- 1 4.0 0.0 1107 2272
+ 33.918907 3 2 ack 40 ------- 1 4.0 0.0 1107 2272
- 33.918907 3 2 ... (5 Replies)
Discussion started by: saqibshah
5 Replies
7. Shell Programming and Scripting
I'm working on writing a shell script that logs out whenever I have a firefox process running during certain times of the day (1 am - 8 am). I'll put it in crontab when it runs properly unless someone knows of a different and better way to do this. Here it is so far.
if ps ax | grep... (4 Replies)
Discussion started by: cokedude
4 Replies
8. Shell Programming and Scripting
Hi Folks,
I have a log that contains data as shown below:
11:59:43,144 (1,850) Signal : ....
11:59:44,109 (1850) Bps : .....
I wish to remove "" from all lines and it is on the start of every line. I have achieved that successfully using the command:
tail -f imp.log | sed 's/\... (4 Replies)
Discussion started by: umairrahman
4 Replies
9. Shell Programming and Scripting
Hi,
Could any one help me to extract data from a report.
I would like to get the two lines which are just below the separations
I have a report like this
--------------------------------------------------------------------------
Pid Command Inuse Pin Pgsp Virtual... (2 Replies)
Discussion started by: ajilesh
2 Replies
10. Shell Programming and Scripting
The problem I have is that I have 23,000 records I need to sort through to pull out LEN: XXXX XX XX XX XX and NCOS: XXX entries from so I can insert them into a database. But some of my records include TYPE: ISDN, THE DN IS UNASSIGNED, or INVALID entries in between some records and I would like... (2 Replies)
Discussion started by: roachmmflhyr
2 Replies