The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
check in unix shell script so that no one is able to run the script manually adi_bang76 Shell Programming and Scripting 1 11-16-2006 10:43 AM
script to loop and check jumping seq. happyv Shell Programming and Scripting 1 10-05-2006 10:55 AM
Script to check for a file, check for 2hrs. then quit mmarsh UNIX for Dummies Questions & Answers 2 09-16-2005 03:46 PM
not quite sure how to loop this script! moxxx68 Shell Programming and Scripting 3 09-09-2004 08:00 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 06-24-2008
angusyoung angusyoung is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 6
looking for help with a dd loop check script

Hi

Can anyone please help with the following script I need - .ksh preferably?

I have external disks attached to a system that I have to label and then run the dd command on all external disk found.

I have kicked off the dd command as follows manually to see what its output is like first and what it throws back:

dd if=/dev/zero of=/dev/dsk/c0t0d0s2 bs=8192

and this doesn't seem to give an exit status or come back to the unix prompt? Should I kick these off as an external task (the ampersand - &)

But anyway...I need to kick off this dd command on all external hard disks found and then go into some kind of checking loop so I can check when these dd commands have finished and then carry on with the rest of my test.

As the dd command doesnt seem to give an exit status, I was thinking that I could run a ps -ef command:

ps -ef | awk '/dd/ && !/awk/ {print $2}'

and log the process id(s) for the dd commands and then when the dd commands have completed there will be NO process id.

How can I do this please within a loop?

thanks

angus
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:22 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0