Sponsored Content
Full Discussion: looping some statements
Top Forums Shell Programming and Scripting looping some statements Post 302482916 by Sriranga on Thursday 23rd of December 2010 03:36:52 AM
Old 12-23-2010
looping some statements

Hi,
assume there are some dir structure like -

Quote:
/xyz/abc/123/qwe
/xyz/dfe/123/qwe
/xyz/ghi/123/qwe
I need to write a script to create 5 new directories under 'qwe' dir of all the above 3 dir structures. these 5 dir will have same name.
I don't want to use 15 mkdir statements. i just want to write 5 mkdir statemets and use them 3 times. I appreciate any help.

I am on UX-HP machine.

Last edited by Sriranga; 12-23-2010 at 05:26 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

or statements?

how do i do an or in an if-then statement? i tried: if ; then bleh fi how???? (1 Reply)
Discussion started by: Blip
1 Replies

2. UNIX for Dummies Questions & Answers

Else in If Statements

Sorry to be a pain, but how does the else work in the if statements? Ive been making scripts with if statements but i cant get the else statements working. Can you help? (8 Replies)
Discussion started by: chapmana
8 Replies

3. Shell Programming and Scripting

Please help on IF statements.

I had different problem scenarios with IF statement. Can any expert please enlighten me on the difference with these scenarios. Thank you. 1st Scenario: testdate=`date +%Y%m` test=`cat /var/log/database0.$testdate*.log | grep "Errors found during processing" | tail -10` if then ... (4 Replies)
Discussion started by: filthymonk
4 Replies

4. Shell Programming and Scripting

Looping through a shell script with sql statements

Hello members, I'm working on the Solaris environment and the DB i'm using is Oracle 10g. Skeleton of what I'm attempting; Write a ksh script to perform the following. I have no idea how to include my sql query within a shell script and loop through the statements. Have therefore given a... (4 Replies)
Discussion started by: novice82
4 Replies

5. Shell Programming and Scripting

Help with IF statements

I am writing a script that does a search for a argument in a file and lists all like occurrences. The script verifies that it is a file and then runs another script that list the lines. My problem is that I need the script to accept a file or a directory and then go to that directory check all... (1 Reply)
Discussion started by: zero3ree
1 Replies

6. Shell Programming and Scripting

vi and if statements

Hi I am very new to Unix programming and shell scripting. I am trying t figure out how to write a little script that will output the number of directories. I can find the number of directories using ls -l | grep "^d" | wc -l I can not figure out how to do it so when I type the name... (8 Replies)
Discussion started by: Reddoug
8 Replies

7. Shell Programming and Scripting

Using While and If statements

Hi guys, Two problems I need solving please. I created a script where the user types in 7 numbers as standard input and each one is then stored in an array. Now I need to perform the following calculations on those numbers: 1) Use a while loop to determine the largest number in the range. ... (2 Replies)
Discussion started by: jjb1989
2 Replies

8. Homework & Coursework Questions

Using While and If statements

1. The problem statement, all variables and given/known data: Two problems I need solving please. I created a script where the user types in 7 numbers as standard input and each one is then stored in an array. Now I need to perform the following calculations on those numbers: 1) Use a while... (11 Replies)
Discussion started by: jjb1989
11 Replies

9. UNIX for Dummies Questions & Answers

if and then statements

I came across a bash script that outputs the forecast for the day and the max temperature but at the end of the day the max temperature disappears ($6) and I am left with "°C" after the forecast. Here is the script: #! /bin/bash curl -s --connect-timeout 30... (7 Replies)
Discussion started by: _light_
7 Replies

10. Shell Programming and Scripting

Nested looping statements

I cannot get the code below to work correctly. The IF statement works just fine, but not the looping. The inner loop tries to find files for a given vendor; if found, I need to sleep giving another process time to move the files. Once the given vendor's files are gone, then I want to move on to the... (1 Reply)
Discussion started by: dgreene
1 Replies
MU-MKDIR(1)                                                   General Commands Manual                                                  MU-MKDIR(1)

NAME
mu_mkdir - create a new Maildir SYNOPSIS
mu mkdir [options] <dir> [<dirs>] DESCRIPTION
mu mkdir is the mu sub-command for creating Maildirs. It does not use the mu database. With the mkdir command, you can create new Maildirs with permissions 0755. For example, mu mkdir tom dick harry creates three Maildirs, tom, dick and harry. If creation fails for whatever reason, no attempt is made to remove any parts that were created. This is for safety reasons. OPTIONS
--mode=<mode> set the file access mode for the new maildir(s) as in chmod(1). BUGS
Please report bugs if you find them: http://code.google.com/p/mu0/issues/list AUTHOR
Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> SEE ALSO
maildir(5) mu(1) chmod(1) User Manuals May 2011 MU-MKDIR(1)
All times are GMT -4. The time now is 03:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy