10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I've been working on this for 2 days and I'm not getting far. It is time to turn to you guys.
With the data below, I am trying to create a file that looks like this: I'd like to use some form of egrep I think.
AY#box#P04prod_to_contingency s AY#cmd#P04dump_cont_db s AY#cmd#P04get_on_ice_job s... (2 Replies)
Discussion started by: rawbi01
2 Replies
2. Shell Programming and Scripting
I have a file that contains the 2 following lines (from /proc/mounts)
/dev/sdc1 /mnt/backup2 xfs rw,relatime,attr2,noquota 0 0
/dev/sdb1 /mnt/backup xfs rw,relatime,attr2,noquota 0 0
I need to match the string in the second column exactly so that only one result is returned, e.g.
> grep... (2 Replies)
Discussion started by: jelloir
2 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
I was wondering why tail -n 2 filename produce an error when I manage to do similar command on head -n 2 filename
SunOS{type8code0}: tail -n 2 filename
usage: tail ]
tail ] (2 Replies)
Discussion started by: type8code0
2 Replies
4. Shell Programming and Scripting
Hi all,
can any one suggest me the script to grep multiple strings from ps -ef
pls correct the below script . its not working/
i want to print OK if all the below process are running in my solaris system. else i want to print NOT OK.
bash-3.00$ ps -ef | grep blu
lscpusr 48 42 ... (11 Replies)
Discussion started by: steve2216
11 Replies
5. Shell Programming and Scripting
I am trying to write a simple if statement but that driving me crazy:eek: with syntactical erorrs.
This is what I managed to come up
#!/bin/ksh
USERNAME=`whoami`
if ;then
echo " you have logged in as report user"
elif ; then
echo " you have logged in as extract user"
else " I dont... (3 Replies)
Discussion started by: kkb
3 Replies
6. Shell Programming and Scripting
hi, i'm a beginner in Linux, actually i use andLinux,
i have a data file with 11 columns
170 N SER T 25 56.962 42.701 -133.423 1.00 87.04 N
171 CA SER T 25 57.076 41.790 -132.280 1.00 86.65 C
172 C SER T 25 57.766 40.492 -132.692 1.00 87.52 C
173 O SER T 25 58.653 39.988 -131.992 1.00 86.59... (6 Replies)
Discussion started by: elsa
6 Replies
7. UNIX for Dummies Questions & Answers
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies
8. Shell Programming and Scripting
BACKGROUND:
I am using Solaris 10. Some of my boxes have gnu grep and I can use -A and -B flags on those. However, the solaris flavor of grep won't use the flags -A or -B. And some of my boxes won't be getting gnu grep.
Should I try using perl, awk, or sed?
Actual PROBLEM: I am... (7 Replies)
Discussion started by: el_guero
7 Replies
9. Shell Programming and Scripting
Iam a learner of UNIX. Fortunately I got this site.
I want to check the file for its existance.
if
echo " Not present"
else
echo "Present"
fi
The above code is working fine. But I also want to check for the files which are compressed.
I tried the following code and it is not... (5 Replies)
Discussion started by: ganapati
5 Replies
10. UNIX for Dummies Questions & Answers
I am trying to run a program which checks to see if a process is running. If the process is not running, I want to start (re-start) the process. If the process is still (already) running, do nothing.
Here is the process; it starts manually:
$java Validation
here is my code to see if it is... (1 Reply)
Discussion started by: mulligm
1 Replies