Grep Linux Command

Posted at 12:38 AM


grep Linux Command 

grep is a utility to look for specific strings in files, making a search line by line, you can also use regular expression instead of a string.

Usage
grep [options] pattern [file-list]
grep output with no options are all the lines that contain the pattern in the given file.
Some of its more useful options are:
-v
Reverse the behavior of grep and make it list the lines that do not contain the pattern
-n
Shows the line where the pattern is (or is not using the -v option) together with the line number
-c
Displays the number of lines that contains the pattern in the give file(s)
-i
Makes grep to show as a match no matter the case, (lower or upper) so it is no more case sensitive
Some examples of these options are:
Having the file grep.txt (Which the man page of grep listed below)
grep -c very grep.txt 1
grep -c in grep.txt 181
grep -i email grep.txt

Example for grep -E

[prompt]$ vi abc.txt
[prompt]$ cat abc.txt
1
2
3
4
[ prompt ]$ grep -E "1|3" abc.txt
1
3







How to translate the web page to different language

Posted at 12:22 PM

Google Translate : "Instantly translate entire webpages

This extension shows a banner at the top of the page whenever it detects that the language of a page you're on is different from the language you're using for your Google Chrome interface. Click the Translate button in the banner to automatically translate the page. You can also click the extension's button on the toolbar to translate the page. Learn more about Google Translate

To learn more the extension, visit its homepage in the Extensions Gallery. You can discover even more extensions in the gallery."

How to get the performance of a web pages

Posted at 12:20 PM

Get insights about your web application performance

This extension is geared for web developers who want to see performance statistics for their web applications. Click the button added to the toolbar to get a better picture of where time is being spent in your application. The extension visualizes metrics that are taken from low level instrumentation points inside of the browser and analyzes them as your application runs. You can analyze problems caused by:

Javascript parsing and execution
Layout
CSS style recalculation and selector matching
DOM Event handling
Network resource loading
Timer fires
XMLHttpRequest callbacks
Painting
To use this extension, make sure you're using the developer version of Google Chrome and running the browser with the following command line flag: --enable-extension-timeline-api

To learn more, visit the extension's homepage in the Extensions Gallery. You can also visit the open-source project codesite. For more information, see the getting started guide."

How to share web content directly from web page

Posted at 12:18 PM

Google Share Button

Use the Share extension to share webpages via your social networks, email and blogs.

The same Google Share Button found in Google Toolbar for Internet Explorer and Firefox is now available as an extension for Google Chrome. Click the Share button and select your desired service from the drop-down menu. Frequently used services will appear at the top of the menu, and you can find more services by clicking 'View more services' at the bottom of the Options menu. Just like Google Toolbar and Shareaholic, we use the Open Share Icon to promote a consistent icon for sharing on the web and the Open Share Icon is licensed under a Creative Commons license.

To learn more, visit the extension's homepage in the Extensions Gallery. You can discover even more extensions in the gallery."