Skip to content

matrixzj/sed_debugger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Quick sample
$ cat emails.txt
[email protected]
[email protected]

$ cat emails.txt| sed 's#@.*##'
user
otheruser

$ cat emails.txt | ./sedsed -d --hide=hold 's#@.*##'
PATT:[email protected]$
COMM:s#@.*##
PATT:user$
user
PATT:[email protected]$
COMM:s#@.*##
PATT:otheruser$
otheruser

The -d option turns debug ON.
The --hide=hold options hides the HOLD SPACE buffer contents, because it is always empty on this example.
The PATT: lines on sedsed's output shows the PATTERN SPACE buffer contents.
The COMM: yellow lines show the command which is being executed.
The user and otheruser lines are the sed's normal output.
The $ sign at the end of PATT: lines represent the end of the buffer.

Indent
$ cat email-linker.sed
h;s|.*|<link>&<link>|;x;/@/{s/@.*/'s email:/;G;}

$ ./sedsed --indent -f email-linker.sed
h
s|.*|<link>&<link>|
x
/@/ {
    s/@.*/'s email:/
    G
}


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages