1. Both are scripting languages, bcz they support automation.
2. Both work primarily with text files SED primarly used for search and
replace & AWK allows to match various columns Matching text,
search and replace etc also.
3. Both are programmable editors.
4. Both accept command-line options (-f script_file)
5. Sed loops through all input lines of input stream or file
Sed accepts input on.from: STDIN(keyboard),File, pipe(|)
6. sed supports address to indicate which lines to operate on:
/^$/d -- delete blank lines from a file
^ followed by a $ sign means blank lines. and action performed here is "d" means delete. It will delete all blank lines from the file.
7. AWK is a field processor, based on whitespace, means single spaces, tab so on. AWK is used for extracting specific columns from data feeds.
8. AWK supports programming constructs: loops(for,while,do)
9. conditions (if,then,else)
10. arrays(lists). Functions(string,numeric,user-defined)
2. Both work primarily with text files SED primarly used for search and
replace & AWK allows to match various columns Matching text,
search and replace etc also.
3. Both are programmable editors.
4. Both accept command-line options (-f script_file)
5. Sed loops through all input lines of input stream or file
Sed accepts input on.from: STDIN(keyboard),File, pipe(|)
6. sed supports address to indicate which lines to operate on:
/^$/d -- delete blank lines from a file
^ followed by a $ sign means blank lines. and action performed here is "d" means delete. It will delete all blank lines from the file.
7. AWK is a field processor, based on whitespace, means single spaces, tab so on. AWK is used for extracting specific columns from data feeds.
8. AWK supports programming constructs: loops(for,while,do)
9. conditions (if,then,else)
10. arrays(lists). Functions(string,numeric,user-defined)
Terima kasih telah membaca artikel tentang Features of AWK and SED di blog Tutorial Opensource and Linux jika anda ingin menyebar luaskan artikel ini di mohon untuk mencantumkan link sebagai Sumbernya, dan bila artikel ini bermanfaat silakan bookmark halaman ini di web browser anda, dengan cara menekan Ctrl + D pada tombol keyboard anda.