Dear Members,
I have the following situation I do not understand:
I have a large json encoded file which I need to grep and afterwards want to extract specific information.
I use this command to to that:
This works fine and give me the information I need:
Now pasting the same command in a shell variable
suddenly gives me all files and folders in that directory followed by the information I'm looking for:
Does anyone have a clue what could cause such behavior and can give some advice on how to get rid of the file information?
Thank you very much in advance
Crumble
I have the following situation I do not understand:
I have a large json encoded file which I need to grep and afterwards want to extract specific information.
I use this command to to that:
Code:
cat /tmp/file | awk -F '"fields":' '{print $2}' | awk -F '"description":' '{print $4}' | awk -F ',' '{print $1}' | awk -F '"' '{print $1}'
Code:
My Information
Code:
content=`cat /tmp/file | awk -F '"fields":' '{print $2}' | awk -F '"description":' '{print $4}' | awk -F ',' '{print $1}' | awk -F '"' '{print $1}'`
Code:
folder1 folder2 file1 file2 My Information
Thank you very much in advance
Crumble