Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: h3nd
  • Order by date
  1. h3nd

    quick question about sed pls...

    Thanks Anni, You're so brilliant !!!
  2. h3nd

    quick question about sed pls...

    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
  3. h3nd

    quick question about sed pls...

    brilliant !!!
  4. h3nd

    quick question about sed pls...

    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
  5. h3nd

    quick question about sed pls...

    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,
  6. h3nd

    To run the script in window time

    Well, actually the file just loaded to database, I was thinking either create a list or create a flag file. Thanks man anyway
  7. h3nd

    To run the script in window time

    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...
  8. h3nd

    Run the Script from particular point ...

    Hi Brian, I like your idea, I will try that. Thanks man.
  9. h3nd

    Run the Script from particular point ...

    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...
  10. h3nd

    Running command simultaneously, please help

    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 ...
  11. h3nd

    Running command simultaneously, please help

    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...
  12. h3nd

    Running command simultaneously, please help

    $ 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.
  13. h3nd

    Running command simultaneously, please help

    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?
  14. h3nd

    Running command simultaneously, please help

    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...
  15. h3nd

    Running command simultaneously, please help

    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
  16. h3nd

    Running command simultaneously, please help

    Isn't it gonna crash the server if it's full loaded ? Dont you think so ?
  17. h3nd

    Running command simultaneously, please help

    lol.. sorry, I typed wrong.. it's been along day... 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 until [[ $(ps -fu adm | grep "loadcommand" | grep...
  18. h3nd

    Running command simultaneously, please help

    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...
  19. h3nd

    Running command simultaneously, please help

    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 ?
  20. h3nd

    Running command simultaneously, please help

    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...

Part and Inventory Search

Back
Top