This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ $# -eq 0 ]; then | |
echo "dos2unix whole directory, keeping timestamps" | |
echo "" | |
echo "$0 <directory1/dos> <directory2/ux>" | |
echo "it will copy contents of <dir1> to <dir2> changing new lines from dos to unix" | |
exit 0 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/////////////////////////////////////////////////////////////////////////////// | |
// | |
// \file bin2hex-2.c | |
// \brief Converts binary input to hexadecimal | |
// \usage assuming your program prints output to stdout | |
// $ echo -n "Lorem ipsum" | bin2hex | |
// $ cat file.bin | bin2hex | |
// or you can convince shell to do the job for you | |
// $ bin2hex < file.bin > file.bin.hex | |
// |