home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 35.12 Converting Between ASCII and EBCDIC Chapter 35
You Can't Quite Call This Editing
Next: 35.14 Cutting Columns or Fields with cut
 

35.13 Other Conversions with dd

Besides converting between ASCII and EBCDIC (35.12 ) , you can use dd to convert:

  • fixed length to variable-length records (conv=unblock ), and the reverse (conv=block )

  • uppercase to lowercase (conv=lcase ), and the reverse (conv=ucase )

  • the byte order of every pair of bytes (conv=swab )

The cbs= option must be used to specify a conversion buffer size when using block and unblock . (This is also true when using conversions between ASCII and EBCDIC.) The specified number of characters are put into the conversion buffer. For ascii and unblock conversion, trailing blanks are trimmed and a newline is added to each buffer before it is output. For ebcdic , ibm , and block , the input is padded with blanks up to the specified conversion buffer size.

- TOR


Previous: 35.12 Converting Between ASCII and EBCDIC UNIX Power Tools Next: 35.14 Cutting Columns or Fields with cut
35.12 Converting Between ASCII and EBCDIC Book Index 35.14 Cutting Columns or Fields with cut

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System