10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Sorry for the weird title but i have the following problem.
We have several files which have between 10000 and about 500000 lines in them. From these files we want to remove lines which contain a pattern which is located in another file (around 20000 lines, all EAN codes). We also want to get... (28 Replies)
Discussion started by: SDohmen
28 Replies
2. Shell Programming and Scripting
Hi all,
I want to set up a script to email a person to confirm another program is running but i wish to avoid having to customise the script for each individiual.
I am ok with what i need to do except i need to get the first and last name of the user to construct an email address to send to.... (6 Replies)
Discussion started by: KlintJ
6 Replies
3. Shell Programming and Scripting
awk 'NR>=5034&&/Max/{++c}c==3{o=$0 RS $0 RS $0; print o; c=0}' logfile
i would like to modify the above awk command to instead show lines that are the most frequent:
for instance, given a log file containing:
Warning MaxClient is having issues - please
MaxClients java error...yams... (4 Replies)
Discussion started by: SkySmart
4 Replies
4. Shell Programming and Scripting
How do I capture an error for any command I use.
For e.g if i try to zip a file and the file is not there. The regualr $? -gt 0 only tells its un-successful but won't tell me that the file is not there when I run through a script. How can I capture this error?
for e.g.. zip $x.zip $x... (1 Reply)
Discussion started by: dsravan
1 Replies
5. Shell Programming and Scripting
Hi guys!
I'm new to scripting and I need to write a script in awk.
Here is example of file on which I'm working
ATOM 4688 HG1 PRO A 322 18.080 59.680 137.020 1.00 0.00
ATOM 4689 HG2 PRO A 322 18.850 61.220 137.010 1.00 0.00
ATOM 4690 CD ... (18 Replies)
Discussion started by: grincz
18 Replies
6. Shell Programming and Scripting
Hi, I need some help with a script I'm trying to write. I have a log file containing references to a number of different webservices. I wish to write a script that will list the webservices with a count as to how many times they appear in the log.
An example of the log file content:
... (2 Replies)
Discussion started by: gman2010
2 Replies
7. Shell Programming and Scripting
#!/bin/sh
who
echo "\r"
echo Enter the terminal ID of the user in use:
echo "\r"
read TERM_ID
echo "\r"
ps -t $TERM_ID | grep sh
echo "\r"
echo Enter the process number to end:
echo "\r"
read PID
echo "\r"
kill -9 $PID
What this code does is ultimately grab the PID of a users sh... (6 Replies)
Discussion started by: psytropic
6 Replies
8. Shell Programming and Scripting
Hi All, I really need your help. I am a begginner in shell script and I believe this is a very simple issue.
I have in my directory, n-files, like 1.dhm, 2.dhm, 3.dhm.
These files have 1 column with 1 value per line, like:
1.dhm
------
10
20
30
40
50
2.dhm
------
30
50
20 (3 Replies)
Discussion started by: dhuertas
3 Replies
9. Shell Programming and Scripting
Hello i'm writting a krn shell that will find the letter F and I would like to grab everything from F till 0:00. Is there a sed or awk command that i could use.
Thank you. File is looks like this.
11/12 xxx xxxx xxx F xxxx xxxx
some info entered here
some info entered here
xxxx... (1 Reply)
Discussion started by: wisher115
1 Replies
10. Shell Programming and Scripting
I want to search a file for a string and then if the string is found I need the line that the string is on - but also the previous two lines from the file (that the pattern will not be found in)
This is on solaris
Can you help? (2 Replies)
Discussion started by: frustrated1
2 Replies