some sed examples
Sed stands for “stream editor” and parses text file to apply textual transformations. It evolved as the natural successor of grep.
Below some examples of commands:
http://sed.sourceforge.net/sed1line.txt
migration from Windows to Linux (Ubuntu)
If you want to give Linux a try here goes a list of replacements for the usual stuff in windows:
http://www.linuxrsp.ru/win-lin-soft/table-eng.html
If you dislike the replacements you can always use the windows version with wine - windows emulator:
http://appdb.winehq.org
Big-IP v4 redirect
If you want to generate an unconditional redirect from siteA to siteB, just write this:
if (http_host starts_with “www.siteA.com”) {
redirect to http://www.siteB.com:%p/%u“
}
Where:
- %p stands for the port.
- %u stands for the url path.
fc bash command
“fc” will bring the last command typed into an editor, “vi” if that’s the default editor. Of course you can specify a different editor by using the -e switch as follows:
$ fc -e emacs
To list last few commands, type:
$ fc -l
For the last 10 commands it will be:
$ fc -l -10
acl on ext2/ext3
Ever wandered how to have a full file ACL on your Linux filesystem instead of the usual user:password:others?
apt-get install libattr1 libacl1 acl
setfacl
getfacl
Interesting links:
http://www.adelux.fr/libre/howto/en/samba_ext3_acl
No comments