BASH | URLENCODE
For each character in string do # IN=”\\”;printf -v OUT ‘%%%02x’ “‘$IN”; echo $OUT or # echo “this & that” | perl -MURI::Escape -ne ‘chomp;print uri_escape($_),”\n”‘
For each character in string do # IN=”\\”;printf -v OUT ‘%%%02x’ “‘$IN”; echo $OUT or # echo “this & that” | perl -MURI::Escape -ne ‘chomp;print uri_escape($_),”\n”‘
Linux: # FLOCK STUFF PIDFILE=/var/run/$(basename $0) exec 100>$PIDFILE flock -n 100 || exit 1 echo $ > $PIDFILE # … your code … test -r $PIDFILE && rm -f $PIDFILE FreeBSD: Install flock Other BSD: THATSME=”$(ps wwaux | grep -w $ | grep -v grep | awk ‘{$1=$2=$3=$4=$5=$6=$7=$8=$9=$10=””;print $0}’ | sed ‘s|^\s*||’)” && ps wwaux […]
# find /data/exchange -type f \( -iname “*.mov” -o -iname “*.mp4” \) -exec du -cm {} + | sort -n
try qshape qshape deferred postqueue -p postcat -q ABCDEF012 postqueue -f postsuper -d ALL deferred
mount.cifs does not accept your arguments? add vers=1.0 to your options
echo “äöüßé” | iconv -t ascii//TRANSLIT
function createPassword () { CNTSYLL=$1 CNTNUM=$2 test “x$1” == “x” && return 1 test “x$2” == “x” && return 1 PASS=”” YYY=( a e i o u ei au ai eu iu ui oi) ZZZ=( b c d f g h j k l m n p q r s t v w x y […]
Create some functions: function prepare_dialog () { # DIALOG STDOUT exec 3>&1 } function d_selectOneGender () { C_GEND_LIST=”$(getexistinggenders)” D_STRG=”” for C_GEND in $C_GEND_LIST; do D_STRG=”${D_STRG} $C_GEND Gender OFF $C_GEND” done dialog \ –backtitle “$VERSION” \ –clear \ –title “$1” \ –item-help \ –radiolist ‘Select one:’ \ $H $W $MH \ $D_STRG return $? } … […]
For the second column… # cat $FILE | awk ‘{$2=$2==int($2)?int($2):int($2)+1}1’
EXAMPLE: cuts 10 seconds from the very beginning and recodes to 256 kbit/s sox file.in.mp2 -C 256 file.out.mp2 trim 10
You must be logged in to post a comment.