What is Awk and Sed?



What is Awk and Sed?..

Answer / shoaib

sed is a stream editor. It works with streams of characters on a per-line basis. It has a primitive programming language that includes goto-style loops and simple conditionals (in addition to pattern matching and address matching). There are essentially only two "variables": pattern space and hold space. Readability of scripts can be difficult. Mathematical operations are extraordinarily awkward at best.

awk is oriented toward delimited fields on a per-line basis. It has much more robust programming constructs including if/else, while, do/while and for (C-style and array iteration). There is complete support for variables and single-dimension associative arrays plus (IMO) kludgey multi-dimension arrays. Mathematical operations resemble those in C. It has printf and functions. The "K" in "AWK" stands for "Kernighan" as in "Kernighan and Ritchie" of the book "C Programming Language" fame (not to forget Aho and Weinberger). One could conceivably write a detector of academic plagiarism using awk.

Both programs use regular expressions for selecting and processing text.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SDK Interview Questions

Discuss some of the reasons for implementing process migration ? How is the process address space handled during process migration?

1 Answers   TCS,


directories can be implemented either special files that can only be accused in limited ways or can be implemented as ordinary data files. what are advantages and disadvantages of this approach?

0 Answers   NIBS,


What is direct mount and indirect monut?

0 Answers  


Explain the process control block of UNIX ?

0 Answers  


Explain the difference between ntfs & fat file systems?

0 Answers  






what is the operating system of mac?

3 Answers  


can you create con folder in windows, if not why?

3 Answers  


Explain about dynamic memory allocation algorithm?

0 Answers  


Which file system allow as much fragmentation FAT32 or NTFS?

2 Answers  


how make a bootable dick

0 Answers   Accenture, HCL, Wipro,


in a time-sharing operating system, when the time slot given to a process is completed,the process goes from the Running state to the: a) BLOCKED state b) Ready state c) SUSPENDED state d) Terminated state

3 Answers   Public Service Commission,


what are the stands for OAB(offline address book) in exchange server?

1 Answers   DELL, Microsoft,


Categories