Sponsored Content
Top Forums Shell Programming and Scripting Batch write multiple usb in same time Post 302574804 by wayneliao38 on Friday 18th of November 2011 10:50:40 AM
Old 11-18-2011
GREAT felipe Smilie,

it works for me.

could you please help to insert a pause command?
I need to plug another four usb stick ~ Smilie

Code:
Press any key to start!

Formatting usb disk: [/dev/sdc1]
Mounting disk: [/dev/sdc1] under: [/media/usb/sdc1]
Formatting usb disk: [/dev/sdc2]
Mounting disk: [/dev/sdc2] under: [/media/usb/sdc2]
Formatting usb disk: [/dev/sdc3]
Mounting disk: [/dev/sdc3] under: [/media/usb/sdc3]
Formatting usb disk: [/dev/sdc4]
Mounting disk: [/dev/sdc4] under: [/media/usb/sdc4]
Creating directory under: [/media/usb/sdc1] - [001][sdc1]...
Creating directory under: [/media/usb/sdc2] - [002][sdc2]...
Creating directory under: [/media/usb/sdc3] - [003][sdc3]...
Creating directory under: [/media/usb/sdc4] - [004][sdc4]...
[NEED A PAUSE for replace new usb]
Creating directory under: [/media/usb/sdc1] - [005][sdc1]...
Creating directory under: [/media/usb/sdc2] - [006][sdc2]...
Creating directory under: [/media/usb/sdc3] - [007][sdc3]...
Creating directory under: [/media/usb/sdc4] - [008][sdc4]...

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to write a Script to run series of batch jobs on unix platform

Im new to unix shell scripting, I have to run batch jobs on unix. for example i have 5 jobs. first 2 can kickoff parallely. after completely finishing the 2 previous jobs the 3 job should kick off..once 3rd is over 4 th and 5th can kick off parallely. Each jobs run for 1 or 2 hours each. How to... (2 Replies)
Discussion started by: venki311
2 Replies

2. Red Hat

formating a USB which is throwing error write delayed

Hello, while i was saving a web file directing on to usb location there was some network problem which result in error WRITE DELAYED on windows xp. so pen drive is not getting completely formated(show as Windows was unable to complete format).From then onwords it is not allowing to copy... (0 Replies)
Discussion started by: amarnathbasis8
0 Replies

3. UNIX for Advanced & Expert Users

Multiple processes write to log file at the same time

If we have 3 process to write to same log file at the same time like below. will it cause the data outdated because the multiple process writing same time? It this a safe way to keep the log for multiple process? p1 >> test.log &; p2 >> test.log &; p3 >> test.log & Thanks, (1 Reply)
Discussion started by: casttree
1 Replies

4. Shell Programming and Scripting

Multiple process write to same log file at the same time

If we have 3 process to write to same log file at the same time like below. will it cause the data outdated because the multiple process writing same time? It this a safe way to keep the log for multiple process? p1 >> test.log &; p2 >> test.log &; p3 >> test.log & Thanks, (5 Replies)
Discussion started by: casttree
5 Replies

5. Debian

Write permission for USB device

Hello, I need to run an application in wine that requires write permission to a USB device. Wine users must not have root privileges. On FreeBSD this could be accomplished by adding the user to the wheel group but I am using Debian 6.0. From looking at the passwd file it is not obvious what... (6 Replies)
Discussion started by: snorkack59
6 Replies

6. Shell Programming and Scripting

Xentop Batch Time Display Help

I would like to be able to display the local time (or anytime for that matter) when I run Xentop in batch mode. Is that possible? (In other words, when I look back at the data, I want to be able to tell what time that the output was displayed). (2 Replies)
Discussion started by: Coyote2012
2 Replies

7. AIX

How to write a script to run without password on a batch of servers?

I need run a command such as ps -ef |grep xxx on a batch of servers, how to write a script to run it without password? don't need go in each server to check? Thanks (7 Replies)
Discussion started by: rainbow_bean
7 Replies

8. Shell Programming and Scripting

How to write BTEQ batch scripts in UNIX?

Hi All, I need to write Unix shell script. To star with : I need to do some file checking on unix file system, then based on file existance, I need to run diff SQL in Teradata Bteq. After that, depending on Results of SQL, I need to code other shell scripting like moving file, within same... (4 Replies)
Discussion started by: Shilpi Gupta
4 Replies

9. Shell Programming and Scripting

Is it possible to write write multiple cronjobs in shellscript??

Hi All, I need the answer of below question? 1) How to write multiple cronjobs in shellscript? Is there any way or we cant write in shellscript... Regards, Priyanka (2 Replies)
Discussion started by: pspriyanka
2 Replies
dr_symlinks(1)							  USER COMMANDS 						    dr_symlinks(1)

  NAME
      dr_symlinks - maintain a symlink forest

  SYNOPSIS
      dr_symlinks

  DESCRIPTION
      For each pair directory/subdirectory under each word in DR_SL_TARGETS, a directory and symlink DR_SL_SOURCE/directory/symlink is created (or
      adjusted).  The script is implemented as a wrapper around oggsymlinks, by Wessel Dankers.

  EXAMPLE
      If, in the configuration file $HOME/.draai/symlinksrc, DR_SL_SOURCE is set to /srv/audio and DR_SL_TARGETS is set to "../data/a  ../data/b",
      while directories

       /srv/data/a/And_You_Will_Know_Us_By_the_Trail_of_Dead/Source_Tags_And_Codes/
       /srv/data/a/And_You_Will_Know_Us_By_the_Trail_of_Dead/The_Century_of_Self/
       /srv/data/a/John_Coltrane/A_Love_Supreme/
       /srv/data/b/John_Coltrane/Giant_Steps/
       /srv/data/b/Tinariwen/Amassakoul/

      exist, the following directories holding the following symlinks will get created in /srv/audio/ :

       And_You_Will_Know_Us_By_the_Trail_of_Dead/Source_Tags_And_Codes ->
	../../../a/And_You_Will_Know_Us_By_the_Trail_of_Dead/Source_Tags_And_Codes/
       And_You_Will_Know_Us_By_the_Trail_of_Dead/The_Century_of_Self ->
	../../../a/And_You_Will_Know_Us_By_the_Trail_of_Dead/The_Century_of_Self/
       John_Coltrane/A_Love_Supreme -> ../../../a/John_Coltrane/A_Love_Supreme/
       John_Coltrane/Giant_Steps -> ../../../b/John_Coltrane/Giant_Steps/
       Tinariwen/Amassakoul -> ../../../b/Tinariwen/Amassakoul/

      All dangling symlinks and empty directories (if any) under /srv/audio/ will get removed. This script is idempotent.

  ANOTHER EXAMPLE
      joostvb@hille:~% ls media/usb/audio/200504/Al_Green
      The_Very_Best_Of/

      joostvb@hille:~% ls media/usb/audio/
      200504/  200708/	200801/  200805/  200807/  200812/  200910/  201005/  201009/
      200609/  200712/	200803/  200806/  200808/  200905/  201004/  201006/

      joostvb@hille:~% cat .draai/symlinksrc.usb

      DR_SL_SOURCE=~/media/audio
      DR_SL_TARGETS="$( cd $DR_SL_SOURCE && ls -d ../usb/audio/* )"

      joostvb@hille:~% DR_SL_RCFILE=.draai/symlinksrc.usb dr_symlinks

      joostvb@hille:~% ls -l media/audio/Al_Green
      total 0
      lrwxrwxrwx 1 joostvb joostvb 48 2011-03-11 09:12 The_Very_Best_Of -> ../../usb/audio/200504/Al_Green/The_Very_Best_Of/

  ENVIRONMENT
      dr_symlinks honors booleans: DR_SL_VERBOSE, DR_DEBUG and DR_DRYRUN and strings: DR_SL_RCFILE, DR_SL_TARGETS and DR_SL_SOURCE.

  FILES, CONFIGURATION
      All configuration variables (see ENVIRONMENT) can be set in ~/.draai/symlinksrc. This rc-file is sourced as a shell script.  If DR_SL_RCFILE
      is set, its value is assumed to be the dr_symlinks rc-file.

  COPYRIGHT AND LICENSE
      This manpage is copyright 2009, 2011 Joost van Baal <joostvb-draai@mdcc.cx>.

      Draai is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, as published by the Free
      Software	Foundation,  either  version 3 of the License, or (at your option) any later version. This program is distributed WITHOUT ANY WAR-
      RANTY. You should have received a copy of the GNU General Public License along with draai. If not, see http://www.gnu.org/licenses/.

  AUTHOR
      Joost van Baal <joostvb-draai@mdcc.cx>

  dr_symlinks 20110603						     03 juin 2011						      dr_symlinks(1)
All times are GMT -4. The time now is 03:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy