in reply to Why is my Catalyst application creating a 'detach' file at the root level?

LittleJack:

The ">" symbol tells the shell to pipe the output of the executed command (the stuff to the left) to the file named on the right.

$ ls _README_MCM_ count_interrupts.cpp waitable_timer.cpp change_interval.cpp measure_interval.cpp $ grep c->detach *.cpp $ ls _README_MCM_ count_interrupts.cpp measure_interval.cpp change_interval.cpp detach waitable_timer.cpp

So in this case, you'll want to either quote the string you're searching for, or escape any special symbol that the shell will treat differently.

The bit that surprised me is that you can put the filenames to search for on the right side of the '>' symbol, I was expecting a warning or something, but as you can see above, it worked just fine and I got the 'detach' file in the directory as you indicated.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

  • Comment on Re: Why is my Catalyst application creating a 'detach' file at the root level?
  • Download Code

Replies are listed 'Best First'.
Re^2: Why is my Catalyst application creating a 'detach' file at the root level?
by LittleJack (Beadle) on Aug 07, 2021 at 04:47 UTC

    How embarrassing! Thank you for explaining that. Quoting the shell special character would have solved the problem, you're right. And the behaviour is a little strange as you say.