The two lines below are what I have for my UNIX shell.
cobc -free -x -o$(basename "$1" .exe) "$1" ./$(basename "$1" .exe)
When I type:
...the program runs fine. But the original cobolfile (no extension) gets overwritten with compiled system code so the content looks exactly like the cobolfile.exe system code. So I can only run the program once then everything is lost... How to I tweak my shell program to avoid this?