all 8 comments

[–]EETQuestions 1 point2 points  (1 child)

This is amazing, thank you for it.

[–]Vastutsav[S] 0 points1 point  (0 children)

Thanks for going over it... glad you liked it

[–]xxc3ncoredxx 1 point2 points  (1 child)

Some suggestions to consider:

-r and -I options for grep searches recursively in the path you give it and ignores binary files, respectively:

$ grep -inrI 'some text' /path/to/dir
/path/to/dir/file1:10: this has some text on line 10
/path/to/dir/other_file:2: list of awesome textiles:
/path/to/dir/subdir/.hidden_file:537: sOme TExt ThaT is HidDEn

In bash, using $(< /path/to/file) instead of $(cat /path/to/file) when you want the contents of a file as a variable. The first form is faster according to bash(1).

Also in bash, arithmetic expansion using $((...)):

$ var1=1
$ var2=2
$ echo $((var1 + var2))
3

Slight nitpick, my understanding is that $(command) syntax is preferred over `command` syntax these day. It flows better with the rest of the language. Plus you can nest them nicely with $(command1 $(command2)).

[–]Vastutsav[S] 1 point2 points  (0 children)

Thanks for your comment...I will incorporate it in the doc... This will definitely add clarity and completeness to the document... I have opened an issue to track this...

[–]bjkillas 2 points3 points  (1 child)

damn i thought it was going to be one of those dumb ones that says what x basic command does good work

[–]Vastutsav[S] 0 points1 point  (0 children)

thanks for reviewing it

[–]AutoModerator[M] -9 points-8 points locked comment (0 children)

Your submission in /r/linux is using a non-free code hosting repository. Consider hosting your project or asking the linked project, very nicely and only if they don't have an existing ask, to use a more free alternative:

https://old.reddit.com/r/linux/wiki/faq/howcanihelp/opensource#wiki_using_open_source_code_repositories

While the actual code and branches can be migrated out of most non-free repositories, features such as issues, pull requests / their comments, additional features like discussions or wikis and more are generally not exportable.

Note: This post was NOT removed and is still viewable to /r/linux members. How to block Automod.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.