I am trying to assign the output of the cut command to a variable, however I ran into some strange problem. I am using tcsh shell.
$echo $0 tcsh
This is the command I run:
$set a=`cut -f2 -d' ' test.txt` Missing }. //This is the output I am getting
Now the file is simple (well, this is not the file I was working on, but I reduced the problem to that.)
Test.txt:
{ {corner
Here it is! This is a file. If I changed the file to this:
{ {corner}
The statement works, but "a" gets the following value:
$echo $a corner
Therefore, I think the shell is trying to execute {corner
as a command, and has complained since its closing bracket is missing. Does anyone know why he is exhibiting this behavior? I understand that it should just assign the output of cut to a variable, but it looks like it resolves it recursively! Newbie
source share