Hi PHV,
one more question:
what about I wanna remove second and the last :
I've tried this doesnt work
awk -F ":=" '{x=$3;gensub(/*/,"",2,x);sub(/*$/,"",x);print x}'
Thanks man
Thx PHV,
but what about using awk, because what I'm doing like this :
echo "[Nov 09 10:10:31] DONE[1] := 1 := *generic.sh*5*" | awk -F ":=" '{print $3}' | sed 's/\*//1;s/\*$//'
I want to remove the first instance and last instance,
so if I can use awk, that would be neater script..
Thx man
Hi guys,
I just wanna remove the last instance (*) of value :
the original value is :
*generic.sh*5*
I have tried :
echo "*generic.sh*5*" | sed -e 's/\*//'
But it didnt work, any idea ??
Thanks,
Hi guys,
I would like to run my script between time 12.00-17.00
The script could be like this
while [[ "$(date +%H%M)" -ge "1200" ]] && [[ "$(date +%H%M)" -le "1700" ]]
do
check directory dir
for file in *20061017
do
if $file hasnt loaded
load.ksh $file...
Hi guys,
I need help to run my script from particular point,
at the moment my script contain children scripts and looks like this :
#!/bin/ksh
Script1
if[ $return_code -ne 0 ];then
exit $return_code
Script2
if[ $return_code -ne 0 ];then
exit $return_code
Script3
if[ $return_code -ne 0...
Thanks Anni,
But dont worry then, I run out the time to test it ..
If I use this script to load it takes 27 mnts.
But if I use wait it loads around 51 mts.
So, there's something wrong with that matching command...
Anyway, could you please help me in my new thread thanks ...
Hi Anni/All,
Thanks for top explanation, I got real total cpu thx.
Now, I wanna ask about my script
Load_Trade(){
for file in `ls trade`
do
[load command] $file > log$file 2>&1 &
while [[ $(ps -eo comm | grep "loadcommand" |wc -l) -ge 3 ]]
do
sleep 5
done
done...
$ top '?'
top: Unknown argument `?'
usage: top -hvbcisqS -d delay -p pid -n iterations
same Anni, yeah they are running in the same OS and version of top, and I think it's in one server
because i typed it in server 01.
top version :
procps version 2.0.17
OS :
LSB_VERSION="1.3"
Red Hat Enterprise Linux AS release 3 (Taroon Update 8)
There is no top I dude,
$ top I
top: Unknown argument `I'
usage: top -hvbcisqS -d delay -p pid -n iterations
hmmm, strange isnt it?
Hi Anni,
I found somethin interesting in my other server here, this is my big server which has link to other 4 server (20 cpus) and the other one is small one which has 1 server with 4 cpus.
I checked the top in, it says like this :
19:52:24 up 58 days, 23:18, 2 users, load average: 2.13...
Sorry man, I dont understand this.
Can you give me any example ?
One more question, what's the best book you recommended for me to buy for korn shell ?
And also for perl ?
I used to learn perl, but now I already forgot
Thx man
Hi Anni/All,
I want to change the "wait" to others but I'm not sure whether it's gonna work.
Here's my script:
Load_Trade(){
for file in `ls trade`
do
[load command] $file > log$file 2>&1 &
while [[ $(ps -eo comm | grep "loadcommand" |wc -l) -ge 3 ]]
do
sleep 5
done...
Hi Anni,
I think I ended up using your command,
$( ps -eo comm | grep "${SEARCHSTRING}" | wc -l )
cause it waits, using "jobs -p" doesnt wait, why ?
If I have 17 files, it loads 17 files at a time ???
which is not good ?
Any explanation why ?
Hi SamBones,
is this correct ?
while (( $(jobs -p|wc -l) >= 3 ))
Cause I tried to type manually in shell :
this parameter didnt produce the value.
$(jobs -p|wc -l)
but this one yes :
$(jobs -p) | wc -l
0
Anyway, I put my script like this :
while [[ $(jobs -p|wc -l)>=3 ]]
do...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.