02-28-2008
I must confess, I stopped reading at the part where you talk about the need to make each level directory as you go.
Why not just use the -p flag to mkdir? Might save some effort...
9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I am getting the different accessing permissions for the directories ,for some directories it is drwxr-sr-x, for some other directories it is like drwxr-xr-x.
what is the difference between these 2 access permisions of the directories? (1 Reply)
Discussion started by: bishnu.bhatta
1 Replies
2. Shell Programming and Scripting
Hi all,
my problem:
(little extract from my bash-script)
I want to move each file (.mov) from one directory (and many Subdirectories) to another directory (only one);
after moving i want to create hardlinks to the old directories.
Thatīs no problem, but now:
source-directories... (4 Replies)
Discussion started by: tubian
4 Replies
3. Shell Programming and Scripting
Hi
I need a script that can search through a set of directories and can locate any file or directory that has a space at the end
Filename(space)
Foldername(space)
I then need to remove that space within the script
Hope someone can help
thanks in advance
Treds (8 Replies)
Discussion started by: treds
8 Replies
4. Emergency UNIX and Linux Support
Hi,
I have a small issue while using variables for a file name in UNIX.
I have file name like "abc def 123.txt"
Folder will be in /zzz/xxx/yyy
I created 2 variables Folder = '/zzz/xxx/yyy'
file = 'abc def 123.txt'
While using this in grep command i am... (6 Replies)
Discussion started by: pssandeep
6 Replies
5. Shell Programming and Scripting
All, I have a cleanup script that removes directories and all contents underneath, but I am having issues with directories with spaces.
This is the command I am currently running, how can I get it to work with directories with spaces?
find /path -mindepth 3 -type d -exec rm -rf {} \; (29 Replies)
Discussion started by: markdjones82
29 Replies
6. Shell Programming and Scripting
Hi,
I am writing a shell script to build Java options dynamically in a variable array and pass them to java.exe. If an option value contains a space, I cannot find a way to get it interpreted correctly. Here is my example:
#!/bin/bash
JAVA_HOME=/opt/jvm/jre1.5.0_18
JAVA_OPTS=("-Xms256m... (4 Replies)
Discussion started by: Romain
4 Replies
7. Shell Programming and Scripting
Hi all,
I've a requirement as below
Source file src.txt sample data:
A<10 white spaces>B12<5 white spaces>C<17 white spaces>
A1<5 white spaces>B22<5 white spaces>C13<17 white spaces>
when I'm fetching a record from this file into a shell variable like below:
vRec=`head -1 src.txt... (2 Replies)
Discussion started by: madhu_1126
2 Replies
8. Shell Programming and Scripting
My code
path=`find /root/folder/ -maxdepth 100 -type d | sort --random-sort | head -1`
if this returns a directory with spaces in for instance:
/root/folder/this is a folder
is there a way to replace the value of path with the same value but with the spaces replaced so its... (2 Replies)
Discussion started by: digitalviking
2 Replies
9. Shell Programming and Scripting
Hi
I have a list file with complete path of files and there are directories with spaces. Now when i read the list file, read the line and read the file it says no file found because of the space. How can I get through this issues
for file in $(<list_file.txt)
do
first_line=`head -1... (8 Replies)
Discussion started by: lijjumathew
8 Replies