Hi,
I am having a shell Script which i need to modify. I am new to shell scripting , needs help. The Logic which needs to be incorporated is as follows :-
The script need to check the length of first Line in a data fine and of the length of the file is > 130 then validated the input parameter in the shell script for e,g :-
variable = $ Length -1|Data file| wc - ?
if $ variable > 133 + 'R'
Abort
if $ variable < 180 + 'D'
Walk forward
Note : 'R' and 'D' are paramater passed to shell scipt at runtime. The Variable should check the length of datafile first and then compare it with the input parameters , If input Parameter is 'R' then it should check the legth of datafile and if it finds the legth > 133 the prog should abort and press a message that "the user shold pass 'D' instaed of 'R' and vice versa.
something like above.
Regards
Milind