Search This Blog

Monday, February 21, 2011

[: missing `]' +bash +shell scripts

 "=" sign requires a blank in front of it and after it. Otherwise, the bash only sees "something" within the brackets, and that is true (0), while "nothing" is false (1):

[ 5 = 6]
[ 5 = 6 ] 

Friday, February 18, 2011

Solution: rpmbuild: command not found

yum  install  rpm-build

Wednesday, February 9, 2011

Solution: merge two files / append two files in Linux

cat file1 file2 .. fileN  > mergedfile
Note the '>' in the command: it points that the target file follows, don't forget to put it there.

If you accept that entries in the resulting file are sorted, you can use uniq to remove duplicates.

cat file1 file2 | sort | uniq > mergedfile

Thursday, February 3, 2011

Solution : raise TypeError("bufsize must be an integer")

Error :['vim'],['/home/patelm/.bashrc'])


Whenever you're running and you see this
error, say to yourself: "Have I passed the command line
as one parameter in a list; or have I passed it as a series
of parameters?"

Wednesday, February 2, 2011

diff rcs file

rcsdiff -r1.1 -r1.2 -u file

here we are diffing rev 1.2 agains 1.1

If you want to colour the output you can use the idiff script

rcsdiff -r1.1 -r1.2 -u file | ./idiff