Bash - Octal Dump

#!/bin/bash : ' Create file ' file="$(pwd)/world.txt" touch $file : ' Add Content ' echo "Hello World \t\tThis is some text!!! !@#$%^&*()_+=-[]{}\|:,.<>/?~ 123456789" > $file : ' View the octal dump ' od -c $file : ' Output: 0000000 H e l l o W o r l d \n \ t \ t 0000020 T h i s i s \n s o m e \n 0000040 t e x t ! ! ! \n ! @ # $ % ^ & 0000060 * ( ) _ + = - [ ] { } \ | : , . 0000100 < > / ? ~ \n 1 2 3 4 5 6 7 8 9 \n 0000120 '
od [OPTION]... [FILE]...

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.