1/05/2016

linux change letters from upper case to lower case

If your input only contains ASCII characters, you could use tr like:
tr A-Z a-z < input 
or (less easy to remember and type IMO, but not limited to ASCII latin letters):
tr '[:upper:]' '[:lower:]' < input
if you have to use sed:
sed 's/.*/\L\1/g' < input
http://unix.stackexchange.com/questions/171603/convert-file-contents-to-lower-case

linux join every 3 lines in a file

$ cat file.txt
xxxxxxxxx
yyyyyyyyyyy
zzz
aaaaaaaaa
bbbbbb
ccccc
$ perl -pi -e 's/\n/ / if $.%3' file.txt
$ cat file.txt
xxxxxxxxx yyyyyyyyyyy zzz
aaaaaaaaa bbbbbb ccccc

http://www.unix.com/shell-programming-and-scripting/115070-how-can-i-join-three-lines-into-one-unix.html