HTML Code:
File Format
dataline1,12,,,,;
dataline2,24,,,;
dataline3,12,,,,;
dataline4,24,,,;
COUNT=0004;
Hi,
I have source(/home/rgupta) and destination folders /
home/rgupta/arch and /
home/rgupta/err. Source folders has many files. I want to move the files from source to destination with some validations.
All files have trailer records contains the count of data line records.As in the above files there there are four records and trialer has count of this (COUNT=0004).
So, before moving to files, this should be validated that count given in the trailer record is same as tolal number of dataline records (wc -l -1).
If the trailer record count = wc -l -1 then files should be moved to /
home/rgupta/arch otherwise these should be moved to /
home/rgupta/err.
Thanks for help in advance.