12 lines
304 B
Bash
12 lines
304 B
Bash
#!/bin/sh
|
|
if test "$1";then
|
|
if test "$1" = "--help";then
|
|
echo "replaces /home/ with ~ making friendlier paths.";
|
|
echo "files relative to current directory";
|
|
else
|
|
lsopt="-d1f";ls="$1";
|
|
fi;
|
|
else lsopt="-f1";ls="./";
|
|
fi
|
|
ls $lsopt "$ls"|rev|cut -f1 -d" "|rev|sed -e "s\\^\\$PWD/\\" -e 's./home/.~.'
|