echopath: created script from alias

master
Pierre Neidhardt 2013-11-14 12:32:09 +01:00
parent 13a0d5501c
commit 0b936fe2de
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,4 @@
# name: >/dev/null
# key: null
# --
>/dev/null$0

21
.scripts/echopath Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
if [ "$1" == "-h" ]; then
cat<<EOF
Usage: ${0##*/} PATH
Display PATH one entry per line. If PATH is not provided, use \$PATH by
default. PATH must be a ':' separated list.
EOF
exit
fi
if [ $# -ne 0 ]; then
ARG="$1"
else
ARG="$PATH"
fi
echo "$ARG" | sed 's/:/\n/g'