how to split special characters "|" using awk

Hi friends

I need to splict special character "|" here.
Here is my script which giving error

LINE=INVTRAN|cd /home/msgGoogle

TraxFolderType=`awk -F"|" '{print $1}' $LINE`
filePath=`awk -F"|" '{print $2}' $LINE`
echo "TraxFolderType: "$TraxFolderType
echo "filePath :"$filePath

output:
------------
awk: cmd. line:1: fatal: cannot open file `INVTRAN|cd' for reading (No such file or directory)
awk: cmd. line:1: fatal: cannot open file `INVTRAN|cd' for reading (No such file or directory)
TraxFolderType:
filePath :

there is a space in 2nd string "cd /home/msgGoogle"
its giving problem
I need output like
TraxFolderType:INVTRAN
filePath :cd /home/msgGoogle

Please give me suggestions.

Thanks
Krishna

Echo the line and pipe it to awk instead of read the line as a file:

TraxFolderType=`echo $LINE | awk -F"|" '{print $1}'`
filePath=`echo $LINE | awk -F"|" '{print $2}'`

Regards

Hi

here it is treating LINE as a file name

try

TraxFolderType=`echo $LINE | awk -F"|" '{print $1}'`

filePath=`echo $LINE | awk -F"|" '{print $2}'`

Thanks
Penchal

Thankyouuuuuuuuuuuuuu

its working
blindly iam doing my working without checking how iam writting code.
Thankyou