Useful tips & tricks

Posted on Sun Feb 25 @ 10:35:51

Here are some useful tips & tricks I frequently use:

VIM search/replace commands
replace the first 'old' in a line with 'new'  :s/old/new
replace all 'old's on a line with 'new'      :s/old/new/g
replace all occurrences in the file     :%s/old/new/g
confirmation each time         :%s/old/new/gc 

flv to mpeg4
ffmpeg -i v.flv -s 320×240 -r 15.00 -b 300 -f avi -vcodec mpeg4 v.avi

Extract audio
mplayer -dumpstream v.avi
mplayer -ao pcm stream.dump

subversion add multiple files
svn st | grep "^?" | awk '{ print $2 }' | while read f; do svn add $f;done

subversion remove multiple files (non existent)
svn st | grep "^\!" | awk '{ print $2 }' | while read f; do svn delete $f; done

Posted in Linux, 0 Comments Comments

Comments


COMMENTS ARE DISABLED

About me

Me
Full name: Ivica Munitic Age: 30
Profession: Developer
Email: ivica@munitic.com.hr

Latest articles

Categories

Archive

Feeds

Log in



 

Webfaction