A következő címkéjű bejegyzések mutatása: bash. Összes bejegyzés megjelenítése
A következő címkéjű bejegyzések mutatása: bash. Összes bejegyzés megjelenítése

2010. február 12., péntek

linker4osx - How to start multiple instances of an application on Mac OSX

This script makes link to your applications, and you can start it in multiple instances.

 #linker4osx by PeTIK Team  ... draft only
#!/bin/bash
echo '#!/bin/bash' > $2/$1
echo '/Applications/'$1'.app/Contents/MacOS/'$1' &' >> $2/$1
echo echo $1 started... >> $2/$1
chmod +x $2/$1

usage:
sudo ./linker4osx APPLICATION_NAME_IN_YOUR_APP_FOLDER DESTINATION_FOLDER_TO_LINK

usage example:
sudo ./linker4osx VLC /usr/bin



and you can start a lot of VLC from Terminal (too...) :)

2009. december 9., szerda

Colorized online/offline checker in bash

Kora reggeli agymenés....


 #!/bin/bash
# Text color variables
txtund=$(tput sgr 0 1) # Underline
txtbld=$(tput bold) # Bold
txtred=$(tput setaf 1) # Red
txtgrn=$(tput setaf 2) # Green
txtylw=$(tput setaf 3) # Yellow
txtblu=$(tput setaf 4) # Blue
txtpur=$(tput setaf 5) # Purple
txtcyn=$(tput setaf 6) # Cyan
txtwht=$(tput setaf 7) # White
txtrst=$(tput sgr0) # Text reset
HOST=IP_ADDRESS
ERTEK=`ping -q -c 4 $HOST | grep "round-trip" |sed 's/\// /g' | awk '{print $8}' | awk '{printf("%d\n",$1 + 0.5);}'`
if [ "$ERTEK" = "" ]; then
ERTEK=-1
fi
if [ $ERTEK -ge 0 ]; then
echo "${txtgrn}online${txtrst}"
else
echo "${txtred}offline${txtrst}"
fi

2009. augusztus 27., csütörtök

xrandr - change screen resolution from terminal

Csak amíg feledésbe nem merül...

Nagyon jó cucc, a display-eket lehet vele konfigolni.

pl.:
 xrandr --output LVDS --off

xrandr --output LVDS --auto

xrandr --output VGA --mode 1680x1050 --rate 80

2009. augusztus 19., szerda

remove CR from windows text file

Ő tudja:

 (ba)sh:$ dos2unix file.txt  

2009. április 8., szerda

Több videó (elejének) vágása 1xre

 for i in `ls *.avi`;

do echo Alakítom: $i;

#ffmpeg -i $i -ss 00:00:44 vagott${i:0} <---lassú

mencoder -ss 00:00:44 -oac copy -ovc copy "$i" -o vagott${i:0}

done




vége levágása:


 mencoder -endpos hh:mm:ss -ovc copy -oac copy in.avi -o out.avi  

2009. április 2., csütörtök

Bash: több kép átméretezése egyszerre

 for i in `ls pic*.jpg`; do echo $i; convert $i -resize 1024x768 -quality 75 m${i:1}; done