I'm being asked to make a python program that parses tokens.
The usage is as follows:
$ cat input.txt | program "some text %{0} and %{1S3}" > output.txt
but the best I can manage is:
$ cat input.txt | py program.py "some text %{0} and %{1S3}" > output.txt
or if I make the script executable, remove the file extension, and I'm in the current directory
$ cat input.txt | ./program "some text %{0} and %{1S3}" > output.txt
Is there a way for me to use the first example's style of execution with a python script? Ideally I'd also be able to use it from anywhere, not necessary when pointing at the directory containing the program.
Edit: I've tried this:
Here's what I tried --
$ cd projects/token_parser/ $ ln -s grap /usr/local/bin/grap ln: failed to create symbolic link '/usr/local/bin/grap': Permission denied $ sudo ln -s grap /usr/local/bin/grap [sudo] password for fosssaintdross: $ grap bash: grap: command not found
PATH
...cat input.txt | program ...
as an example.