Original post from: http://codesnippets.joyent.com/posts/show/1826
array=( foo babar baz )
array=( "${array[@]//ba/TT}" )
echo "${orig[@]}"$'\n'"${array[@]}"
#!/bin/bash | |
# brew install rtmpdump | |
# brew install ffmpeg | |
# brew install youtube-dl | |
# brew install imagemagick | |
ID='c5kuYfTCGLg' # YouTube video ID, i.e. https://www.youtube.com/watch?v={ID} | |
# fetch the video file with youtube-dl |
#!/bin/sh | |
# kill all proccess with name provided | |
if [ ! -z "${1}" ] | |
then | |
kill -9 $(ps aux | grep "${1}" | awk '{print $2}') | |
else | |
echo "Please provide an process name to kill all related process" | |
fi | |
exit |
Original post from: http://codesnippets.joyent.com/posts/show/1826
array=( foo babar baz )
array=( "${array[@]//ba/TT}" )
echo "${orig[@]}"$'\n'"${array[@]}"
#!/bin/bash | |
# Script used to setup elasticsearch. Can be run as a regular user (needs sudo) | |
ES_USER="elasticsearch" | |
ES_GROUP="$ES_USER" | |
ES_HOME="/usr/local/share/elasticsearch" | |
ES_CLUSTER="clustername" | |
ES_DATA_PATH="/var/data/elasticsearch" | |
ES_LOG_PATH="/var/log/elasticsearch" | |
ES_HEAP_SIZE=1024 |