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/'
The life of a PhD Candidate in Software Engineering
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/'
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 have are fixed length records. When specifying the record length, dd goes and trims the trailing spaces off each record. To fix this:
dd conv=ascii if=[in file] | fold -w[record length] > [out file]