If there is a possibility that some records are bad, you need to read the whole thing. If you are just identifying the format, you can read a few lines.
whole file scan
partial:
Hi All,
Please help me out with a script which checks whether a given file say abc.txt is in ASCII format and data is tab-delimited. If the condition doesn't satisfy then it should generate error code "100" for file not in ASCII format and "105" if it is not in tab-delimited format.
If the... (9 Replies)
Hi,
I have a date field in my input file.
I just want to check if its in the format "DD-MM-YYYY".
Is there any command which can achieve this?
Thanks and Regards,
Abhishek (2 Replies)
I have to find the specific formatted file is present in the received list in the directory, for which I have written:
file_list=`ls -lrt /tmp/vinay/act/files |grep "$cdate"| awk '{print $9}'`
while read fileStr
do
find $file_list $fileStr > /dev/null
status=`echo $?`
if ; then
... (3 Replies)
Hi,
I am writting a script, which accepts input file as parameter.
Input file name is aa_bb_cc_dd_ee.<ext>
I need to check that input file name should be of 5 fileds.
Please help me out. :confused: (7 Replies)
My source file having one date column. The formate of the date column is yyyymm. I need to validate whether all the rows are in same format in the given file. If it is not I have captured that records in a separate file. I am very new to Unix. I don't how to achieve this. Plz help me to achieve... (2 Replies)
hi there
I have file names in different format as below
triss_20111117_fxcb.csv
triss_fxcb_20111117.csv
xpnl_hypo_reu_miplvdone_11172011.csv
xpnl_hypo_reu_miplvdone_11-17-2011.csv
xpnl_hypo_reu_miplvdone_20111117.csv
xpnl_hypo_reu_miplvdone_20111117xfb.csv... (10 Replies)
Hi All,
I am trying to check if the file is in dos format using simple grep command but the problem is lines inside the file with have special characters in between and in some lines end of the line will have the '^M' character.
I tried the below command in simple line(without special... (7 Replies)
Hi Experts,
path=/db/files/
format=$1
User can enter any file format.compare the user file format with actual file format existed in the directory /db/files. User enter all characters as "A" apart from date format.
example1: user will be entering the file format AAA_AA_YYYYMMDD.AAA
Actual... (6 Replies)
How can I script to check telephone number entered by user in a uniz script:
print -n "Enter telephone number to check ? " ; read telno
How do I script to :
1) Check if entered without dashes or with dashes
2) If without dashes how can I check:
if telno is only 10... (2 Replies)
So, i have this requirement where i need to check the file format, whether it's EBCDIC or ASCII, and based on format retrieve the information from that file:
my file is:
file1.txt-->this ebcdic file
file2.txt-->ascii file
i tried below code:
file=file1.txt
type="`file $file`"
i get... (7 Replies)
Discussion started by: gnnsprapa
7 Replies
LEARN ABOUT OSF1
cdsuf
cdsuf(1) General Commands Manual cdsuf(1)NAME
cdsuf - read the System Use Fields from a System Use Area
SYNOPSIS
cdsuf [-s number] [-b] file
OPTIONS
The following options are available: Specifies the File Section for the System Use Area to be read. The numbering starts with one. If this
option is omitted the last File Section of that file is assumed. Copies all of the System Use Fields of the System Use Area from the CD-
ROM to standard output in binary format. The name of any file or directory within the CD-ROM file hierarchy.
DESCRIPTION
This command is used to access the System Use Fields of the System Use Area associated with a File Section of a file or directory on a Rock
Ridge formatted CD-ROM and to list its contents on standard output, following any Continuation Fields that may be present.
The output is formatted in the form of a table that contains an entry for each System Use Field in the System Use Area as recorded on the
CD-ROM. Each table entry has the fields Signature, Length, Version, and Data as specified in the System Use Sharing Protocol. If the -b
option is used, the contents of the full System Use Area are written to standard output in binary format as it is recorded on the CD-ROM.
RESTRICTIONS
The user must have read permission for file to execute the command successfully.
EXIT STATUS
The following exit values are returned: Successful completion. File not found, file is not a file or directory within a CD-ROM file hier-
archy, or access denied. File Section indicated by -s does not exist. File Section indicated by -s has no System Use Area.
SEE ALSO cd_suf(3)cdsuf(1)