0
votes
2answers
120 views

Shell script to find what package provides a file on OpenBSD

# for i in `pkg_info -q`; do pkg_info -L "$i" | grep ^/ | sed "s/^/$i/g" | perl -pe 's/\//\t\//'; done | grep tasklist.desktop xfce4-panel-4.10.0p2 ...
0
votes
1answer
99 views

How to only output [a-z;A-Z;0-9;|] chars with ksh?

How can I "whitelist"/output only the (ENglish) a-z;A-Z;0-9;| chars and space in ksh/OpenBSD 5.3? $ echo 'ASDF"`date`ew � kd A | A' ASDF"`date`ew � kd A | A $ echo 'ASDF"`date`ew � kd A | A' | MAGIC ...
2
votes
2answers
728 views

How to get green/red terminals under OpenBSD?

For linux machines I can use: # vi ~/.bashrc # red/green terminal colors regarding exit code export PROMPT_COMMAND='PS1="` if [[ \$? = "0" ]]; then echo "\\[\\033[0;32m\\]"; else echo ...
5
votes
2answers
1k views

Adding Ctrl-L as “clear” hotkey in OpenBSD's ksh

I've been looking for a way to use Ctrl-L to clear the monitor instead of typing clear in each time. I found nothing except a patch which didn't work for me. How do I add hotkeys/shortcuts to my ...