Collection of small shell helpers to make life easy.
Just source it
ls -1 /home/ac/_work/projects/[email protected]/helpers/*sh | while read a; do
echo "source $a">> $temphlp;
done;
func1 | while read a; do
func2 param1 $a
done
func1 | hlp_bash_iterator func2 param1
That is realy close to xargs with line separator, but I am more comfotable with while loop.
NOTE: Remember about subshell problem!
hlp_bash_fullpath file1
Equal to
echo "$(pwd)/file1"
Repeat command until it failed or timeout
hlp_until_false_or_timeout <command> <count default:1> <timeout default:1>
Make json looks nice.
cat 1.json | hlp_format_json
You need to install json.tool python module.
Recurcive get with wget
Usefull for files published over apache
hlp_wget_recurcive <url> <depth>