Question

I want to search the program ">>" that is by which you append to a file.

I run the code unsuccessfully in Mac

find . -print0 | xargs -0 grep " >> "

I get too many results to find the correct app. The program is not among other teletypes at /bin.

How can you find the program ">>"?

Was it helpful?

Solution

There is no program called ">>" - it's just a part of the shell's syntax.

OTHER TIPS

This is a shell operator, not a program at all.

Read the code for bash. Or find a simpler implementation of a Bourne Shell. There must be several on the web. Here is one http://heirloom.sourceforge.net/sh.html.

This is not a program, this is a shell construct. Try man bash.

As others have mentioned, it's just part of the syntax. Like + and - are part of math syntax. If you want to overwrite a file, use a single >, to append use double >>. It works both ways. So if you want to use a file as input, just use <. Each line of the file will be passed to the command. command < file.txt

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top