03-25-2008
Well i got a somewhat fix if anyone comes along a similar problem
IFS=$'\n'
in the begining of file to change the delimiters
10 More Discussions You Might Find Interesting
1. 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
2. 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
3. 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
4. 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
5. 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
6. 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
7. 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
8. 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
9. 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
10. 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
AR(5) File Formats Manual AR(5)
NAME
ar - archive (library) file format
SYNOPSIS
#include <ar.h>
DESCRIPTION
The archive command ar combines several files into one. Archives are mainly used as libraries of object files intended to be loaded using
the link-editor ld(1).
A file created with ar begins with the ``magic'' string "!<arch>
". The rest of the archive is made up of objects, each of which is com-
posed of a header for a file, a possible file name, and the file contents. The header is portable between machine architectures, and, if
the file contents are printable, the archive is itself printable.
The header is made up of six variable length ASCII fields, followed by a two character trailer. The fields are the object name (16 charac-
ters), the file last modification time (12 characters), the user and group id's (each 6 characters), the file mode (8 characters) and the
file size (10 characters). All numeric fields are in decimal, except for the file mode which is in octal.
The modification time is the file st_mtime field, i.e., CUT seconds since the epoch. The user and group id's are the file st_uid and
st_gid fields. The file mode is the file st_mode field. The file size is the file st_size field. The two-byte trailer is the string
"`
".
Only the name field has any provision for overflow. If any file name is more than 16 characters in length or contains an embedded space,
the string "#1/" followed by the ASCII length of the name is written in the name field. The file size (stored in the archive header) is
incremented by the length of the name. The name is then written immediately following the archive header.
Any unused characters in any of these fields are written as space characters. If any fields are their particular maximum number of charac-
ters in length, there will be no separation between the fields.
Objects in the archive are always an even number of bytes long; files which are an odd number of bytes long are padded with a newline
(``
'') character, although the size in the header does not reflect this.
SEE ALSO
ar(1), stat(2)
HISTORY
There have been at least four ar formats. The first was denoted by the leading ``magic'' number 0177555 (stored as type int). These ar-
chives were almost certainly created on a 16-bit machine, and contain headers made up of five fields. The fields are the object name (8
characters), the file last modification time (type long), the user id (type char), the file mode (type char) and the file size (type
unsigned int). Files were padded to an even number of bytes.
The second was denoted by the leading ``magic'' number 0177545 (stored as type int). These archives may have been created on either 16 or
32-bit machines, and contain headers made up of six fields. The fields are the object name (14 characters), the file last modification
time (type long), the user and group id's (each type char), the file mode (type int) and the file size (type long). Files were padded to
an even number of bytes. For more information on converting from this format see arcv(8).
The current archive format (without support for long character names and names with embedded spaces) was introduced in 4.0BSD. The headers
were the same as the current format, with the exception that names longer than 16 characters were truncated, and names with embedded spaces
(and often trailing spaces) were not supported. It has been extended for these reasons, as described above. This format is under develop-
ment.
COMPATIBILITY
No archive format is currently specified by any standard. AT&T System V UNIX has historically distributed archives in a different format
from all of the above.
3rd Berkeley Distribution September 24, 1993 AR(5)