Emacs, scripting and anything text oriented.

Using sed

Kaushal Modi

sed stands for stream editor.

This is the most common way of my sed usage:

echo [SOMETHING] | sed 's/old/NEW/g'

Based on that, I have this tcsh alias1 to get timestamps that I use to append to quick tar backups.

alias gettimestamp 'date | tr " :" "__" | sed '"'"'s/_[0-9]*_EDT.*//g'"'"''

Learn about sed from here.


  1. Note how single quotes are escaped inside single-quoted alias definitions in tcsh. [return]

If you have written a response to this, enter your response post's URL below.

Or, you can send a "comment" webmention (it's OK if you don't know what that means). When asked about your website on an IndieAuth login screen, simply type https://commentpara.de.

Markdown Support**bold**, _italics_, ~~strikethrough~~, [descr](link), `monospace`, ```LANG\nline1\nline2\n``` (Yep, multi-line code blocks too, with syntax highlighting!), auto-hyperlinking.

Webmentions #