Check These Out
You can display, save and restore the value of $IFS using conventional Bash commands, but these functions, which you can add to your ~/.bashrc file make it really easy.
To display $IFS use the function ifs shown above. In the sample output, you can see that it displays the characters and their hexadecimal equivalent.
This function saves it in a variable called $saveIFS:
$ sifs () { saveIFS=$IFS; }
Use this function to restore it
$ rifs () { IFS=$saveIFS; }
Add this line in your ~/.bashrc file to save a readonly copy of $IFS:
$ declare -r roIFS=$IFS
Use this function to restore that one to $IFS
$ rrifs () { IFS=$roIFS; }
Show all commands having the part known by you.
Eg:
$apropos pdf | less
libpurple likes to hardlink files repeatedly. To ignore libpurple, use sed: | sed '/\.\/\.purple/d'
This depends on 'stripansi' and 'urlencode' commands, which exist on my system as these aliases:
$ alias stripansi='perl -ple "s/\033\[(?:\d*(?:;\d+)*)*m//g;"'
$ alias urlencode='perl -MURI::Escape -ne "\$/=\"\"; print uri_escape \$_"'
The `open` command handles URLs on a Mac. Substitute the equivalent for your system (perhaps gnome-open).
I don't use system `mail`, so I have this aliased as `mail` and use it this way:
$ git show head | mail
If you are behind a restrictive proxy/firewall that blocks port 22 connections but allows SSL on 443 (like most do) then you can still push changes to your github repository.
Your .ssh/config file should contain:
Host *
ForwardX11 no
TCPKeepAlive yes
ProtocolKeepAlives 30
ProxyCommand /usr/local/bin/proxytunnel -v -p -d %h:443
Host
User git
Hostname ssh.github.com
ChallengeResponseAuthentication yes
IdentityFile ~/.ssh/id_rsa
IdentitiesOnly yes
Basically proxytunnel "tunnels" your ssh connection through port 443.
You could also use corkscrew or some other tunneling program that is available in your distro's repository.
PS: I generally use "github.com" as the SSH-HOST so that urls of the kind git@github.com:USER/REPO.git work transparently :) You
when we add a new package to a aptitude (the debian package manager) we need to add the gpg, otherwise it will show warning / error for missing key
This command will format your alias or function to a single line, trimming duplicate white space and newlines and inserting delimiter semi-colons, so it continues to work on a single line.
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"