The uphill struggle for freedom
Wednesday, December 28, 2011
My favorite bach command prompt PS1
cd ~
nano .profile
add following line at the end
PS1="[\u@\h \W]$ "
export PS1
logout/login
easy to read
link
for more.
Friday, December 23, 2011
GoldenDict is not starting due to "Another GoldenDict copy started already."
smth happen...
Golden dict could not be started. Launch from menu will not open anything.
Launch from terminal:
rivanov@rivanov-desktop:~$ goldendict
Another GoldenDict copy started already.
There is no goldendict process.
Solution:
rm -f ~/.goldendict/pid
Monday, December 12, 2011
Convert file to remove End Of Line character windows/dos to unix/linux
http://www.virtualhelp.me/linux/164-dos2unix-missing-ubuntu-1004
Summary:
sudo aptitude install tofrodos
sudo ln -s fromdos dos2unix
sudo ln -s todos unix2dos
Usage:
dos2unix 1.txt
ubuntu/linux/unix bash location
http://askubuntu.com/questions/87275/why-ubuntu-does-not-have-usr-bin-bash
http://askubuntu.com/questions/88257/what-type-of-path-in-bash-is-more-preferable
Saturday, December 10, 2011
Request for improvement for android application "San Francisco Metro Map" by Bill Ray
Application
https://market.android.com/details?id=san.francisco.metro.map&hl=en
should have images from
http://www.sfmta.com/cms/mmaps/official.htm
and
http://www.sfmta.com/cms/mmaps/indxmaps.htm
to be really useful.
Request was sent as user review.
Wednesday, December 7, 2011
Show only dates in chronology of CVS changes
Command line:
cvs log | grep date: | sort -t ' ' -k2
Sunday, December 4, 2011
Bash/Shell if conditions are lazy for '&&'(AND) expressions
This script is showing that &&(AND) conditions are optimized in Bash/Shell to not calculate rest of condition if first part is already FALSE.
#!/bin/bash
IS_HOLIDAY='N'
RUN_DAYOFF='N'
#if [ "x$IS_HOLIDAY" = "xY" ] && [ "x$RUN_DAYOFF" != "xY" ]; then
if [ "x$IS_HOLIDAY" = "xY" ] && [ echo 'sdfs' ]; then
echo "Skipping unit , today is dayoff"
else
echo "DO unit , today is dayoff"
fi
echo "finished."
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)