Wednesday, February 4, 2009

od and dos2unix

$ head -1 foo.sh | od -c | head -1
0000000   #   !   /   b   i   n   /   s   h  \r  \n
$ 
                                             ^^
I've known about od and dos2unix so I suppose I should have put this together earlier: You can use od to see if running dos2unix is even necessary. If foo.sh were a Unix file it would not have the \r.

No comments: