10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In the hello.htm have the sentenses:
Hello $name
How are you?
The perl script:
$name = "David";
open(HEADER,"hello.htm");
while(<HEADER>) { $html .= $_; }
close(HEADER);
print "$html";I making something about template. But it can't process the $name variable. (4 Replies)
Discussion started by: natong
4 Replies
2. Shell Programming and Scripting
Have a script where I need to wait for a process to run, but from that process I want to capture the row count.
Script I have so far (easier than explanation):
echo "Start"
export NUMROWS=`td "select * from dbc.database" 2> /dev/null |
grep "Query completed" | sed -e 's/.*Query... (7 Replies)
Discussion started by: Cranie
7 Replies
3. Shell Programming and Scripting
Hi All,
I need to get the PID of a process which i ran in background into a variable
echo $! gives me the PID of last background process but how to get this into a variable so that i can use "wait" command later in the script to make sure that this background process was done
var = `echo... (5 Replies)
Discussion started by: firestar
5 Replies
4. Shell Programming and Scripting
I am trying to capture the process on a red hat linux system with the highest cpu utilization into a variable. I have been playing with ps command but really do not think I am making the correct progress.
For instance:
top - 09:01:16 up 63 days, 18:29, 2 users, load average: 0.39, 0.49, 0.48... (5 Replies)
Discussion started by: jaysunn
5 Replies
5. Shell Programming and Scripting
I would appreciate some help, please.
I have a file cutshellb.txt, which contains four report names (but it could be any number from 1 to x. The report suffix is not necessarily consecutive:
report3785
report3786
report3787
report3788
I have a shell script which attempts to read the... (3 Replies)
Discussion started by: Dicloflex
3 Replies
6. UNIX for Advanced & Expert Users
Hi guys, I have a issue with a background process, I need to update the value of a variable in that process which is running at this time and it will be running for at least 2 days.
Any idea?
I will apreciate your help. regards.
Razziel. (2 Replies)
Discussion started by: razziel
2 Replies
7. Shell Programming and Scripting
Hi All,
Am copying mulitple files in a directory in names File0,File1,File2 etc.
I need to print separately the PID of these copies using File names.
for((i=0;i<5;i++))
do
mypid=`ps aux | awk '/File$i/ && !/awk/ { print $2 }'`
echo PID is $mypid
done
It printed nothing. Thinking... (6 Replies)
Discussion started by: amio
6 Replies
8. Shell Programming and Scripting
Hi All,
I have a script which calls a child script with a parameter to be run in the background
. childscript.ksh $a &
Can any one suggest me how do i export a variable from the child script to parent script?
Note that the child script is in background
If the child script is in... (3 Replies)
Discussion started by: aixjadoo
3 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this.
Thanks in advance,
Amudha (7 Replies)
Discussion started by: samudha
7 Replies
10. UNIX for Dummies Questions & Answers
Hello. I would like to strip out the process name from the ${0##*\} variable. So that if I have a script named "mytest.script" the variable would be populated with just "mytest" I have tried doing a substring but it doesnt seem to work.
name=`expr match "${0}" : './*\(/*.\)'`
Doing this... (4 Replies)
Discussion started by: new9021
4 Replies