Hi,
I'm new to unix, i have a variable length file like below,
Code:
01|Test|Test1|Sample|
02|AA|BB|CC|DD|
03|AAA|BBB|CCC|DDD|EEE|RRR|TTT|SSS|YYY|
I need to make this as a fixed length file. Assume that i have 10 columns in the DAT file.
for ex: the first 01 record is having 4cols - there i need to add six "|" delimiter and for 02 record need to add five delimiters.
Hello,
Can someone tell me how unix works out file lenghts please? If I'm ftp'ing a file from a mvs mainframe to a unix box will the file be replicated line by line? I'm looking at the file on the unix box and it's telling me the recl is almost 4000 but it's not that on the mvs side. Should a txt file on unix be a fixed length?
Any help appreciated as usual
Thanks
G
Hi,
The record length may be differ in afile. I want to display the records if the record length is not equal to 50 using sed/awk command.
Thanks in Advance
Hi,
The declaration for directory record length in ext2 filesystem is as follows:
Code:
#define EXT2_NAME_LEN 255
struct ext2_dir_entry_2 {
__u32 inode; /* Inode number */
__u16 rec_len; /* Directory entry length */
__u8 name_len; /* Name length */
__u8 file_type;
char name[EXT2_NAME_LEN]; /* F
Hello,
I have one requirement. We are getting fixed length file with trailer record on it.
We need to cleanse,validate and process the file.
As part of validation we have to do duplicate file check based on file name and trailer record.
I want to add the file name as last column to file, so that I can use the filed for validation purpose.
Hi All,
when i ftp the file from windows machine to unix server the record count in the file is decreased by 1.
example: Say a text file has three lines in it and when you place this file in unix server from your local machine and run a below command
cat filename | wc -l
the output is showing as 2
but when you create a same file and same lines in unix machine directly it will show r
Hi,
I have many scripts where i have used sftp for file transfer from unix box to unix box..
I have converted my DB file to byte array and want to pass it my web service in order to save on server.
I have a log-file where at the end of a series of lines you can see if this block is relevant
now I'm looking for a command like sed to delete de blocks ending with "Content-Length: 0" and beginning with the last "--" before this line.
I tried sed -n "/--/,/Content-Length: 0/d" but this takes the first "--" and the first "Content-Length: 0" and deletes it.
ex :
line 1 "--"
line 2
line 3 "