LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Blogs > peonuser
User Name
Password

Notices


Rate this Entry

Bye proprietary.

Posted 06-14-2015 at 04:08 PM by peonuser

Downloaded the latest openbsd 5.7 install floppy. There is now one less machine running Microsoft product.

Found an interesting quirk with grep. On Debian it is not a big deal, but with Arch it is. You need to add the -a argument on Arch Linix if you want to scrape a file of text and get results instead of just a match flag, Either way works with Debian Linux.

cat weather | grep "Updated"
s/b
cat weather | grep -a "Updated"
Posted in Uncategorized
Views 1055 Comments 2
« Prev     Main     Next »
Total Comments 2

Comments

  1. Old Comment
    Is "weather" a binary or data file vs text file? The "-a" flag is to process such files as if they were text files. If it is already a text file you shouldn't need the "-a" flag.

    I wonder if you have grep aliased to "grep -a" on your Mint install and maybe that is why it works both ways there?
    Posted 06-16-2015 at 03:56 PM by MensaWater MensaWater is offline
    Updated 06-17-2015 at 03:20 PM by MensaWater
  2. Old Comment
    Not using mint, but you could be right aboput the alias. the data is just an old fashoined text file.
    Posted 07-04-2015 at 04:33 AM by peonuser peonuser is offline
 

  



All times are GMT -5. The time now is 10:53 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration