It is a request please use code tags as per forum rules for Inputs/codes/commands which you are using in your posts as per forum rules, following may help you in same.(Not tested though)
If not needed you could remove echo statements in above else statements. If you have some queries or getting issues please post complete requirement, with your O.S details too(along with code tags if necessary).
EDIT: Just now saw you have changed your POST#10 things a lot, following may help you in same, please try and let me know if this helps you then.
Thanks,
R. Singh
Last edited by RavinderSingh13; 02-02-2016 at 01:32 PM..
Reason: Added a note into script now. Added 1 more solution as user changed requirement shown in POST#10
This User Gave Thanks to RavinderSingh13 For This Post:
Hi,
Can any one help me how to create folders using shellscript.My requirement is:
FolderName: Main/Main1
:Main/Main2
:Main/Main3
underSubFolder : Main1/A
:Main1/B
:Main1/C
underSubfolder: A/A1
... (2 Replies)
hi champs,
i have folders structure up to log is there , which is as below,
app
|
|---version-4.1
| |----bin
| | |
| | |-----a.sh
| | |-----b.sh
| |
| |----log
|
|
\---version (symbolic link to version-4.1)
but i want to create another folder... (2 Replies)
Hi,
I am trying to use either awk or sed to drop the first two folders in a path. So if I had path /folder1/folder2/folder3/folder4.... I need to drop folder1&2, so the new path would be /folder3/folder4...
If folder1 and folder2 were the same all the time, this would be easy. But... (4 Replies)
Hi everyone,
I'm stuck with this scenario where our system creates files every night and puts them in several folders according from whom it came from.
I have managed to create a script which will list the folders in one column and the files that are in them in another column, now my problem... (6 Replies)
Hi,
I want to create 10 folders, starting from TEST001 till TEST010, after folder TEST010 is created the script should exit.
Thanks in advance (1 Reply)
Hi
I want to write a small script that will create folders named from `AAAA' all the way to `ZZZZ'.
That is:
`AAAA'
`AAAB'
`AAAC'
...
`AABA'
`AABB'
`AABC'
...
`ABAA'
`ABAB'
`ABAC'
...
`ABBA'
...
`ZZZZ' (4 Replies)
Hello!
I need to realize such task.
1. In my user's home dir I have folder1;
2. In folder1 I have some (various count) subfolders with random names;
3. In these subfolders I have one file anyname.pdf (various name in each subfolder) and file content.txt (constant name in each subfolder)
##... (7 Replies)
hello there,
I have a file called foldermasklist.txt
have
Aayush 1 source1/checksum
Aayush 0 source2/checksum
flexing 1 source1/source2/checksum
flexing 1 time1/checksum
in the format
<parentfolder><flag><subfolders>
script needs to read the flag if it's 1 then folder needs... (2 Replies)
hi again,
having an issue with the code here because it doesnt work :D
can someone point what and how to change, please.
#!/bin/bash
#create directory mylabs, inside create 6 directories named by user.
DIR1="$1"
DIR2="$2"
if ; then
echo -n " there is a folder named mylabs,
what... (1 Reply)
Hi All,
Could any one help me with a shell script which will create different sub folders in a folder and of which the sub folders names should be taken from a text file.
Thanks (1 Reply)