I am writing most of my bash script with nano editor. If one want to get colours in nano, on can do: [bash] locate *.nanorc [/bash] which will give a list of what is available on your system: /usr/share/nano/html.nanorc /usr/share/nano/java.nanorc /usr/share/nano/man.nanorc /usr/share/nano/mutt.nanorc /usr/share/nano/nanorc.nanorc /usr/share/nano/perl.nanorc /usr/share/nano/python.nanorc /usr/share/nano/ruby.nanorc /usr/share/nano/sh.nanorc Now, you can do: [bash] nano -w ~/.nanorc

sed is a linux command that can replace characters and words in a file very easy! Syntax: sed -i ‘s/word/newword/g’ file.txt It means: replace all “word” with “newword” in the file called “file.txt”. Be aware! The option -i means that you will manipulate the file file.txt on-the-fly! If you are not sure, skip the -i

The unix ‘mutt’ command can be used to send an email with attachment: mutt -s “Test message” name@something -a files.tar < message.txt where files.tar is the attached file, and message.txt is the file containing the message. Subject to the email is added with the -s option. In this case: -s “Test message” name@something is the

Create a tar file of files located in a folder: tar -cvf filname.tar foldername/ where: c = create v = verbose f = file filname.tar = the created file ———- To show the content of a tar’ed file: tar -tvf filname.tar ———- extract a file with tar: tar -xvf filname.tar where x = extract v

We needed to collect “Place” information per user from our LDAP server. The problem was that the description of the “Place” came out strangely encoded whenever it contained one of the norwegian characters æ,ø or å. The ldap command: ldapsearch -x -H ldap://ourldapserver.uib.no x121Address=XXXXXX where XXXXXX is the “place” code, gave a place description that