06-03-2011
The Unix file system doesn't use records so a file is just a sequence of bytes. You need to elaborate of what kind of header and trailer records you are referring to.
10 More Discussions You Might Find Interesting
1. Programming
Hi everybody,
I need to check in C program whether a given login is known on the system. Is there any system function that could do this ?
So far, all I could find is getpwnam(), which answers my problem by parsing the local password database. But won't work if a user is authenticated by... (2 Replies)
Discussion started by: xavier054
2 Replies
2. Shell Programming and Scripting
deleted (1 Reply)
Discussion started by: ust
1 Replies
3. Shell Programming and Scripting
Hi Everyone!
I'm quite new to shell scripting so this might be trivial, though 3 days of struggle and search didn't help to solve the problem:
I want to look for files called '*HUN*' in a huge amount of directories most of their names contain whitespaces and print the path of the directory if... (8 Replies)
Discussion started by: sumi76
8 Replies
4. Shell Programming and Scripting
Hi,
I have a script which creates and modifies a csv file.
I have managed to do everything I need to do apart from 1 thing. I need to append a trailer record to the file. I need this line to hold the total of an entire column of the csv file (skipping the 1st line which is a header).
Can... (2 Replies)
Discussion started by: mcclunyboy
2 Replies
5. Shell Programming and Scripting
Hello,
Can you please help me to see if log files exist in a directory?
I need to scan logs in different directories, so I am using an array to change dynamically.
I need help in the if test statement
dir=/logs/MSD
dir=/logs/UPD
countA=1
while (( countA <= ${#dir
} ))
do
cd ${dir}... (1 Reply)
Discussion started by: drbiloukos
1 Replies
6. Shell Programming and Scripting
Hi,
I am checking for existence of files with the same extensions
#! /usr/bin/ksh
txtfiles = '*.txt'
if
then
cp ${dirpath}/${txtfiles} ${dir2path}
fi
I am getting the following error
line 5: [: too many arguments for the if check condition (4 Replies)
Discussion started by: chen.sara
4 Replies
7. Shell Programming and Scripting
Hi,
How to add trailer record at the end of the flat file in the unix ksh shell scripting
can you please let me know the procedure
Regards
Srikanth (3 Replies)
Discussion started by: srikanth_sagi
3 Replies
8. Shell Programming and Scripting
I am trying to omit the trailer record in a variable width file
I tried using awk 'NR >1 { print prev } { prev = $0 }' filename
The above command is giving output but somehow it is trimming columns from the record. For example if my record has columns A,B,C,D
The awk gives output as A,B,C
... (4 Replies)
Discussion started by: abhilashnair
4 Replies
9. Shell Programming and Scripting
Hello,
My script has a trailer record(TR).
Now I need to implement a logic, if TR is missed on the file it should generate me an email stating TR was not on the file..
Kindly help. (15 Replies)
Discussion started by: Harimalyala
15 Replies
10. UNIX for Advanced & Expert Users
I have a EBCDIC multi layout file which has a header record which is 21 bytes, The Detail records are 2427 bytes long and the trailer record is 9 bytes long.
Is there a command to remove the header as well as trailer record and read only the detail records while at the same time not altering... (1 Reply)
Discussion started by: abhilashnair
1 Replies
LEARN ABOUT CENTOS
uuencode
UUENCODE(5) File Formats Manual UUENCODE(5)
NAME
uuencode - format of an encoded uuencode file
DESCRIPTION
Files output by uuencode(1) consist of a header line, followed by a number of body lines, and a trailer line. The uudecode(1) command will
ignore any lines preceding the header or following the trailer. Lines preceding a header must not, of course, look like a header.
The header line is distinguished by having the first 6 characters begin This is followed by a mode (in octal), and a string which names
the remote file. A space character separates the three items in the header line.
The body consists of a number of lines, each at most 62 characters long (including the trailing newline). These consist of a character
count, followed by encoded characters, followed by a newline. The character count is a single printing character, and represents an inte-
ger, the number of bytes the rest of the line represents. Such integers are always in the range from 0 to 63 and can be determined by sub-
tracting the character space (octal 40) from the character.
Groups of 3 bytes are stored in 4 characters, 6 bits per character. All are offset by a space to make the characters printing. The last
line may be shorter than the normal 45 bytes. If the size is not a multiple of 3, this fact can be determined by the value of the count on
the last line. Extra garbage will be included to make the character count a multiple of 4. The body is terminated by a line with a count
of zero. This line consists of one ASCII space.
The trailer line consists of end on a line by itself.
SEE ALSO
uuencode(1), uudecode(1), uusend(1), uucp(1), mail(1)
HISTORY
The uuencode file format appeared in BSD 4.0 .
UUENCODE(5)