i couldn't solve this. when i execute this program i get the following error " line 7: unexpected EOF while looking for matching `'' "
a=115292a1504606846976ULL
b=2
if [ "$b" = "2" ]; then
var1=`echo $a | awk -F"U" '\
{
var2=`echo $var1 | awk -F"a"
{print " "$2}'`
}\
fi
Update: from other, recently closed question
To be more specific, this is my project code
if [ "$FORMAT" = "java" ]; then
cat $INPUT_FILE | awk -F":" '\
/^$/ { print "" }\
/^\/\/.*/ { print " "$0}\
/:string:/ { print " public static final String "$1" = "$3";" }\
/:char:/ { print " public static final char "$1" = "$3";" }\
/:ullong:/ { print " public static final long "$1" = "$3";" }\
/:ulong:/ { print " public static final int "$1" = "$3";" }\
/:long:/ { print " public static final int "$1" = "$3";" }\
' >> $CONST_FILE
fi;
Now i need to truncate $3 (this value is actually read from another file) into two parts(only for ullong). lets say
$3=1256985361455ULL
i need to truncate into 1256985361455 and ULL. (only when it is ullong) please help me out in this issue.
i tried using another awk inside the the following, but ended up in chaos.
/:ullong:/ { print " public static final long "$1" = "$3";" }\