Joined July 2012
·

Bassem Dy

Systems Architect
·
Beirut
·
·
·

Posted to Some Unix Copy/Find/Replace magic over 1 year ago

@psycotica0 Thank you for flagging the typo. It has been fixed. The -i option with blank extension forces sed to edit the files themselves and not create other versions.

Posted to Some Unix Copy/Find/Replace magic over 1 year ago

@eksperimental you're right, that will work but there are subtle differences between egrep grep and fgrep which are perfectly explained in this Stackexchange answer (which I highly recommend going over) http://unix.stackexchange.com/a/17951

Posted to Some Unix Copy/Find/Replace magic over 1 year ago

@serverhorror thank you for the feedback! Greatly appreciated.
I will edit the post to include a notice about exceeding the max command line arguments.

However, all your alternatives for do not satisfy the requirements:

  1. of getting the total number of matching files and not matches inside a given file, hence the use of wc (that provides other options as well)
  2. of recursively looking for matches inside each file of a given parent directory and children

Why?

It might be a nice trick, but that's all it is.

Thanks for sharing, this is quite useful. I've been wondering for a while if an auto-completion solution existed :)

Posted to Wamp v2.2 wrong php_curl extension over 1 year ago

@apathetic Very true. I was looking into Vagrant and Chef a couple of days ago but didn't get the time to start implementing it in my projects. Thanks for the tip though :)

Achievements
142 Karma
8,685 Total ProTip Views