10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a folder with files and I have to process them in a loop. However the filenames have space characters, so the list get split.
$ touch "File Number_1"
$ touch "File Number_2"
$ ls "/tmp/File Number"_*
/tmp/File Number_1 /tmp/File Number_2
I tried following (sorry for using the... (3 Replies)
Discussion started by: Wernfried
3 Replies
2. AIX
I'm sure this has been answered before, but my searches have not turned up the right solution. :confused:
I need to remove files in a directory, without descending into subdirectories, older than n days. Some of the filenames contain spaces or other special characters:
E10403 (2)
E20402 (2)... (15 Replies)
Discussion started by: Papa Lee
15 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
The shell script is currently using the below command to find the seven days older files from a directories and delete them.
Issue occurs when the file name consists of space in them. eg: abc def 1245.txt
I need to delete the files names with space also. Please help.
Thanks.
Below... (7 Replies)
Discussion started by: abhi_123
7 Replies
4. UNIX for Dummies Questions & Answers
Hi,
Anyone can help me on how to list the file with spaces? Like I want to "ls" only the 2008 files.
2008 _overview102.jpg
2008 _overview103.jpg
2008 _overview106.jpg
2008 _overview677.jpg
2008 _overview680.jpg
2008 _overview110.jpg
2008 _overview682.jpg
2009 _overview4373.jpg
2009... (1 Reply)
Discussion started by: fspalero
1 Replies
5. Shell Programming and Scripting
I have a script that I've written and it's been running fine until someone dropped a file in the source directory that had spaces in it. The script breaks the file name into separate mv commands. I've tried putting " around the $FILE but that didn't help. Anyone who can help me would be greatly... (8 Replies)
Discussion started by: Sanglant
8 Replies
6. UNIX for Dummies Questions & Answers
Hi
I am a newbie to unix. I have a current script that reads a directory for excel files and renames the files. There is a problem now because some of the files have spaces. If I put quotes on the file, it will work but I dont know how to read all the files with quotes.
Variables
$1 =... (6 Replies)
Discussion started by: Lillyt
6 Replies
7. Shell Programming and Scripting
Hello, I'm a computer science major and I'm having problems dealing with file names with spaces in them. Particularly I'm saving a file name in a variable and then using the variable in a compare function i.e.
a='te xt.txt'
b='file2.txt'
cmp $a $b
If anyone could help me with this particular... (10 Replies)
Discussion started by: jakethegreycat
10 Replies
8. Shell Programming and Scripting
Hi
I am having difficulty copying files from one dir to another due to a space in the names of the file with an extension .rtf
There are a group of files and the command am using is
cp `ls -rt /wlblive/home/whiops/ops/RTFs/*.rtf|head -20` /wlblive/home/jamshed
Since the files are... (3 Replies)
Discussion started by: jamshedj
3 Replies
9. Shell Programming and Scripting
I am accessing two files. I am using read command to read from the files.
For the first file, I need read the fields delimited by spaces, and for the other file, I need to read the whole line as a single field including the spaces.
When I used read command for the second file, the spaces... (4 Replies)
Discussion started by: kumariak
4 Replies
10. UNIX for Dummies Questions & Answers
Hi there,
our unix and windows are related. i.e. if i save a file while being on windows my unix profile would contain the same file, at the same location. so i can access all my files through unix prompt. but if i save a file/folder being on windows account and put spaces between the name of... (3 Replies)
Discussion started by: a25khan
3 Replies