Tuesday, September 2, 2014

merge columns of multiple files

paste <(cut -d ' ' -f1 file1) <(cut -f2-5 -d ' 'file2) -d ' '> file3

the command above merges the first column of file1 with columns 2,3, and 4 of file2 and dumps it to file3 with a white-space delimiter. columns are separated with white-spaces for file1 and file2.

qlogin to a specific compute node in a sun grid engine

qlogin -l h=<node_name>
e.g.,
qlogin -l h=compute-0-29.sge