10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I'm trying to catch a particular process (XYZ) running using a ksh script. Like So..
VarPS=`ps -ef |grep XYZ |grep -v grep`
However this seems to find the process of the script itself - not the process 'XYZ'
Asked in Error - I found my own typo...
thanks anyway Skrynesaver (1 Reply)
Discussion started by: Mudshark
1 Replies
2. Shell Programming and Scripting
i have this line of code that looks for the same file if it is currently running and returns the count.
`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l`
basically it is assigned to a variable
ISRUNNING=`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh |... (6 Replies)
Discussion started by: wtolentino
6 Replies
3. Shell Programming and Scripting
Hi Guys,
I have an issue with awk and variables. I have trawled the internet and forums but can't seem to get the exactt syntax I need.
I have tried using awk -v and all sorts of variations but I have hit a brick wall. I have spent a full day on this and am just going round in circles.
... (3 Replies)
Discussion started by: gazza-o
3 Replies
4. Shell Programming and Scripting
Hi There,
I am writing a ksh script which assigns variable values from file "A" and passes that variables to file "B". While passing the parameters an additional "$" sign is being assigned to awk -v option.
Could any one help me with this please.
#!/bin/ksh
head -1... (3 Replies)
Discussion started by: Jeevanm
3 Replies
5. Shell Programming and Scripting
Guys,
I am new in awk , I face problem while i try to use for loop in awk,
I am using ksh, i am trying to set a for loop which runs as man times as the records in a file , the for loop like for(a=1;a<=5;a++) is working in my awk script but the one i need is not working :wall:
for example
... (8 Replies)
Discussion started by: djahmed
8 Replies
6. Shell Programming and Scripting
Hi,
I would like to know how can i pipe the following output of grep into a predefined output format
This is the output of the grep command grep record *.txt | sort -r
2010-04-28-11-12-21.txt:C The user has created a record
2010-04-29-10-18-41.txt:U The user has updated a record... (8 Replies)
Discussion started by: alienated
8 Replies
7. Shell Programming and Scripting
Greetings all,
Unix rookie here, just diving into ksh scripting for the first time.
My question may seem confusing but please bear with me:
If I'm understanding everything I'm reading properly, it seems like the ksh language itself doesn't have a lot of string manipulation functions of... (2 Replies)
Discussion started by: DalTXColtsFan
2 Replies
8. Shell Programming and Scripting
Hello,
Im a beginner. Im writing a ksh script with awk. Is it possible to assign the output of the awk to a shell variable?
Like,
shell_variable= awk '$1 == "shell" {abc= $2 }' /tmp/cust_det
echo $shell_variable
Please excuse my ignorance. Thanks in advance. (4 Replies)
Discussion started by: Nic_writes
4 Replies
9. Shell Programming and Scripting
I need help finding out why this script wont run. The chmod is okay, but i get an error saying that I need '&&' on line 5. (18 Replies)
Discussion started by: tefflox
18 Replies
10. Shell Programming and Scripting
I'm trying to write a ksh script that uses awk, but I want to pass variables to awk. For example (not working):
if ];then
searchstr=$1
lsof -i | awk '{if($9~/SEARCHSTR/) print $2} SEARCHSTR=$searchstr'
else
echo "usage: $0 <search string>"
fi
I tried several options. Is it... (3 Replies)
Discussion started by: rein
3 Replies