Monthly Archive for July, 2005

Finding duplicate lines with sed

Something simple and useful. Finding the duplicate lines in UNIX is done with the following series of commands:

sort [file] | uniq -c | awk ‘$1 !~/1/’

Keep trailing spaces when unblocking with dd

I had the task of a simple FTP file transfer from a Mainframe to the development box. Easy enough, until I discovered the horrors of EBCDIC. Anyways, the UNIX tool dd converts one file type to another. To convert from EBCDIC to ASCII, set the conv=ascii parameter.
The problem with this is that the file I [...]