Hi
i am writing a shell script; I need to convert a string to integer so that i can use it in the 'awk' command to choose a field.
can you please help me. thank you.
Hi
i am writing a shell script; I need to convert a string to integer so that i can use it in the 'awk' command to choose a field.
can you please help me. thank you.
read $1 $2 $3
if test "$1"="-f"
read $1 $2 $3
if test "$1"="-f"
then
fieldPos=$2
fileX=$3
awk '{print $fieldPos}' fileX
fi