Hope it helps someone!
158 karma · joined June 16, 2015
Hope it helps someone!
Is my math right? Or do you use something different for compression?
2 Orders of magnitude of storage saving is pretty impressive.
Sounds like a wonderful time for unwinding. What would you be writing in those time?
export BUCKET=____; aws s3 ls "$BUCKET" | tail -n+2 | awk '{print $4}' | while read k; do aws s3 cp "s3://$BUCKET/$k" -; done
If you also want auto-completion, you bascially re-implemented Bud.
1. Problem is You have to explicit define a number of arguments and they have to be named. Consider the situation where you want to call an arbitary number of arguments, can't do that. (ref: https://stackoverflow.com/questions/2214575/passing-argument...)
2. You cannot reference the target in the body of another target. (ref: https://stackoverflow.com/questions/3267145/makefile-execute...) Consider below:
.PHONY: a b
a:
echo A
b:
echo B
a # can't do this
echo B
3. .PHONY should be the default when you don't use file target, which is often the case for most non-C project.With Bud, bash script become your Makefile and bash functions become your Make target. You can have arbitary numbers of arguments, you can reference other targets since they are just functions, and you don't need to explicitly add your target to .PHONY.
There are other reasons you want to move away from Make. For example:
* Defining variable in your target body requires workaround (ref: https://stackoverflow.com/questions/1909188/define-make-vari...)
Open current OSX Finder directory in Terminal:
cdf () {
target=`osascript -e 'tell application "Finder" to if (count of Finder windows) > 0 then get POSIX path of (target of front Finder window as text)'`
if [ "$target" != "" ]
then
cd "$target"
pwd
else
echo 'No Finder window found' >&2
fi
}Do you have flexible time? Like being your own boss kind of deal?
Music credit goes to: [Le Tournedisque](https://soundcloud.com/letournedisque) Photo credit goes to: [Alphacolor 13](https://unsplash.com/@duck58cth) on Unsplash