Friday, December 19th, 2008
Screen allows you to create multiple sessions in which to execute processes (normally interactive shells, at least for me). The most common way of using these multiple shells is via the key bindings to switch between them (ctrl + a,<space> being the most common in my experience).
Often, some windows are ...
Posted in tech | 1 Comment »
Sunday, December 7th, 2008
Hooray. I like keeping up with what my friends are up to, and add any weblog feeds I find to Google Reader whenever I come across one.
Recently I've realised how many of them are using Twitter, which I've signed up for but have no interest in using myself. So, it ...
Posted in tech | 8 Comments »
Friday, December 5th, 2008
How to use variable variables in bash:
[mimi:pgl]:~ $ tits=arse
[mimi:pgl]:~ $ arse=cheese
# this way I figured out myself after a long time pulling my hair out
[mimi:pgl]:~ $ echo ${!tits}
cheese
# this I found later at http://www.seocam.net/how-tos/how-to-create-variable-variables-in-bash
[mimi:pgl]:~ $ eval echo $`echo $tits`
cheese
# how to assign to a variable variable:
[vini:plowe]:~ $ tits=cheese
[vini:plowe]:~ $ arse=tits
[vini:plowe]:~ ...
Posted in tech | 5 Comments »
Sunday, November 16th, 2008
## arrays in bash: assignment, indexing, and looping
##
# assign multiple values to a new array:
array=(tits arse)
# or:
array=([0]=tits [1]=arse)
# or:
array=([0]=tits arse)
# assign single values to specific indices:
array[2]='cheese'
# add a new value to the end of the array (push)
array+=(hmm)
# NB: indices do not have to be congiuous:
array[5]='last'
# view specific element of an ...
Posted in tech | No Comments »
Saturday, July 19th, 2008
# annoying:
[jem:pgl]:~/p/misc_useful $ /usr/bin/scp scp\:copying-filenames-with-colons-in-them.txt localhost:/dev/null
ssh: scp: Name or service not known
# sorted:
[jem:pgl]:~/p/misc_useful $ /usr/bin/scp ./scp\:copying-filenames-with-colons-in-them.txt localhost:/dev/null
The authenticity of host 'localhost (127.0.0.1)' can't be established.
RSA key fingerprint is 12:2b:3a:4e:be:6f:41:f2:20:4c:1b:ee:6a:46:35:61.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (RSA) to the list ...
Posted in tech | No Comments »