Commit 520c7b3f authored by Hermann Mayer's avatar Hermann Mayer

BashRC: Improved the mpx util.

parent 7d948144
......@@ -247,7 +247,22 @@ function mpx()
txtcyn='\e[0;36m' # Cyan
txtrst='\e[0m' # Text Reset
find */ -maxdepth 0 | while read file; do
paths="*/"
cmd="${@}"
if [ $# -gt 1 ]; then
paths=''
cmd="${@: -1}"
for path in "${@:1:$(($#-1))}"; do
paths=$(echo "${paths} ${path}")
done
fi
if [ '' = "${cmd}" ]; then
cmd='ls -lisa'
fi
find ${paths} -maxdepth 0 | while read file; do
echo
echo
......@@ -257,7 +272,7 @@ function mpx()
echo -e "${txtrst}"
cd "${file}"
eval "${@}"
eval "${cmd}"
cd "${CWD}"
done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment