I was learning some shell commands in a little more detail when I came across this situation:
I made a file by the name of foo, by giving this command. (pwd is /home/akudewan/files/)
Code:
$cat > foo.txt
This is a TEXT file
^D
Now, combining the "find" and "grep" command, I will search for the words "TEXT" in my ~/files directory.
So, I did:
Code:
$find /home/akudewan/files -type f | xargs grep TEXT
xargs: unmatched single quote
I got the above error, and I got confused.
I made a subdirectory and did a "cd" to ~/files/temp/. Then I copied foo.txt here and also made another file "file.txt" I changed the command to:
Code:
$find /home/akudewan/files/temp -type f | xargs grep TEXT
/home/akudewan/files/temp/foo:TEXT
As you can see, it worked. I tried the command again in the parent directory, but got the same error. I checked the permissions, no problem with them. So why is this happening? And what does the error mean?