Bash one-liners useful for bioinformatics

2 pointsposted 15 hours ago
by lysozyme

1 Comments

eesmith

14 hours ago

  Display hidden control characters:

  python -c "f = open('file.txt', 'r'); f.seek(0); file = f.readlines(); print file"
That hasn't been updated for Python 3, and I really don't think it does anything reasonable. The 'r' is not needed, the seek is pointless, and the output will contain the Python representation of a list of strings.

Use cat -v:

     -v      Display non-printing characters so they are visible.  ...
Has Perl disappeared from general bioinformatics knowledge?