Why Nostr? What is Njump?
2024-08-26 06:50:16

Lars Wirzenius on Nostr: Sometimes, not often, it really helps me debug complicated shell scripts and other ...

Sometimes, not often, it really helps me debug complicated shell scripts and other things to see what the actual contents of the argv array of a program I'm trying to run is. I wrote a little Python script for this years ago, called print-argv. I just prints out the contents of the argv array.

$ print-argv echo hello world
[0]: /usr/bin/print-argv
[1]: echo
[2]: hello
[3]: world

The script core is:

for i, arg in enumerate(sys.argv):
sys.stdout.write("[%d]: %s\n" % (i, arg))
Author Public Key
npub1kyxuruufugedgvtr37dtteresx93h743jltzussvzu967zlvp89sv3eaz2