Archive for January, 2011

h1

Facebook: Warning About Facebook divulging MORE of your information

17/01/2011

I am creating a new section now dedicated to privacy concerns. Starting now with this alert about Facebook adding the default of giving your address and phone numbers to developers. If you list personal information like address, etc on your facebook page, DON’T!

LinkĀ http://news.cnet.com/8301-1009_3-20028705-83.html

h1

grep’ing for some text + next few lines..

11/01/2011

Was interesting in search output for a particular piece of text, and then getting that line plus the next couple of lines. Google to the rescue again. Found this article on Linux Questions. grep has a (-A/-B/-C) parameter that I never used before. Works well if you do not mind multiple lines being separated by — lines. As per the article, you could also use ‘sed’ in the form of

sed -n ‘/text-to-look-for/,+1p’ file.txt >newfile.txt

I tried both but the grep command was easiest to recall in a pinch. The sed one works better and you do not need to pipe the output to another grep to remove the — lines (grep -v “^–$”)

Follow

Get every new post delivered to your Inbox.