Hi,
I am having to rewrite a script from dtksh to ksh. I had something in the dtksh that looks like this:
if [[ $countit = 3 ]] then
var1=${line:0:10}
var2=${line:11:29}
var3=${line:42:1}
fi
This syntax for the line parsing doesn't translate to ksh. Can someone tell me an easy way to do this inside my ksh using sed or awk? I just want to read in one line from a file and parse it out. Any help would be appreciated. Thanks!
I am having to rewrite a script from dtksh to ksh. I had something in the dtksh that looks like this:
if [[ $countit = 3 ]] then
var1=${line:0:10}
var2=${line:11:29}
var3=${line:42:1}
fi
This syntax for the line parsing doesn't translate to ksh. Can someone tell me an easy way to do this inside my ksh using sed or awk? I just want to read in one line from a file and parse it out. Any help would be appreciated. Thanks!