Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Report the number of PNG images in the directory 000
every 2 seconds.
watch "ls 000/*.png | wc -l"
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Report the number of PNG images in the directory 000
every 2 seconds.
watch "ls 000/*.png | wc -l"
https://linux.die.net/man/1/highlight
highlight -O ansi
highlight -O xterm256
pygmentize
alias c='pygmentize -g'
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
https://github.com/xonsh/xonsh/wiki/Cheatsheet
While $()
in xonsh works similar to $()
in (all variants of) shell,
it cannot be used in the middle of argument of …
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
subprocess.run
is preferred to the function os.system
for invoking shell commands.
For more discussions,
pleaser refer to
[Hands on the Python module subprocess]https://www.legendu.net/en/blog …
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
#!/bin/sh
''''which python2 >/dev/null 2>&1 && exec python2 "$0" "$@" # '''
''''which python >/dev/null 2>&1 && exec python "$0" "$@" # '''
''''exec echo "Error: I can't find python anywhere" # '''
https …