LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   The mistery of <<< (https://www.linuxquestions.org/questions/linux-newbie-8/the-mistery-of-4175424393/)

sluge 08-28-2012 08:12 AM

The mistery of <<<
 
Hello!
I try to execute command:
# cut -d . -f 2 < tmp.pyMANw61Ev
bash: tmp.pyMANw61Ev: No such file or directory

But when I type
# cut -d . -f 2 <<< tmp.pyMANw61Ev
pyMANw61Ev

It works great! What is the special symbol <<<?

acid_kewpie 08-28-2012 08:22 AM

well you're asking it to do a different thing, one doesn't "not work".

< will redirect from a *FILE* called tmp.pyMANw61Ev but here you seem to be wanting to split a string, so the two things are not comparable.

grail 08-28-2012 09:55 AM

< - Redirection
<< - Here document
<<< - Here string


All times are GMT -5. The time now is 10:19 PM.