Linki
Snippety
- ant_choose
#!/bin/bash
targets=`sed -n 's/.*<target name="\([^"]*\)".*$/\1/p;' build.xml | sort`
target=`zenity --title="Choose ant target" --height=600 --list --column=target $targets`
if [[ -n $target ]]; then ant $target; fi - imagemagick
convert *.bmp -gamma 0.2 -monochrome -compress Group4 test.pdf
(gamma - parameter expansion
${f//\\//} - replace all backslashes with slashes (// = replace all)
- printf
printf -v nr "%03d" $i
- wget (moved to github wiki)
--page-requisites (-p) --force-html (-F) --no-directories (-nd) --html-extension (-E)
--convert-links (-k) -q -r -l 1 -w 1 --random-wait -I /katalog/podkat
--no-clobber (-nc) - powtórzone pliki nie będą dublowane jako .1, .2 itd.
--server-response (-S) show headers
--timestampings (-N) - nadpisuje, gdy nowsze lub większe
--continue (-c) --directory-prefix= (-P - output directory) -O xxx (output file)
-e robots=off - utilities
nmap - port scan
- zenity
zenity --entry --text "Podaj" --title "Tytul"
zenity --title="Choose ant target" --height=600 --list --column=target $targets - other
for (( i=0; i<5; i++ )); do echo $i; done
# reset vt terminal
echo -e \\033c
# find newest file in subdirectories
find . -type f -printf "%TY-%Tm-%Td %TT %pn\n" | sort | less
# formatowanie daty
date +%Y%m%d_%H%M