Quantcast
Channel: Commands tagged od sorted by votes
Browsing latest articles
Browse All 8 View Live

Image may be NSFW.
Clik here to view.

urlencode

$ (Command too long..See sample Output..) curl doesn't provide url-encoding for 'GET' data, it have an option '--data-urlencode', but its only for 'POST' data. Thats why I need to write down this...

View Article


Image may be NSFW.
Clik here to view.

Outputs a 10-digit random number

$ head -c4 /dev/urandom | od -N4 -tu4 | sed -ne '1s/.* //p' View this command to comment, vote or add to favourites View all commands by opexxx Diff your entire server config at ScriptRock.com

View Article


Image may be NSFW.
Clik here to view.

Outputs a 10-digit random number

$ echo $RANDOM$RANDOM$RANDOM |cut -c3-12 View this command to comment, vote or add to favourites View all commands by emmerich164 Diff your entire server config at ScriptRock.com

View Article

Image may be NSFW.
Clik here to view.

Outputs a 10-digit random number

$ n=$RANDOM$RANDOM$RANDOM; let "n %= 10000000000"; echo $n View this command to comment, vote or add to favourites View all commands by alset Diff your entire server config at ScriptRock.com

View Article

Image may be NSFW.
Clik here to view.

See non printable caracters like tabulations, CRLF, LF line terminators (...

$ od -c <FILE> | grep --color '\\.' For fancier and cleaner output, try the following snippet : showendlines(){ while read i; do od --address-radix=n --width=$(wc -c <<< "$i") -c...

View Article


Image may be NSFW.
Clik here to view.

Convert ascii string to hex

$ echo -n "text" | od -A n -t x1 |sed 's/ /\\x/g' If you're going to use od, here's how to suppress the labels at the beginning. Also, it doesn't output the \x, hence the sed command at the end. Remove...

View Article

Image may be NSFW.
Clik here to view.

extracts 64 bytes of random digits from random lines out of /dev/random sent...

$ cat /dev/urandom|od -t x1|awk 'NR > line { pos=int(rand()*15)+2;printf("%s",$pos);line=NR+(rand()*1000);digits = digits+2 } digits == 64 { print("\n");exit }' Use this the next time you need to...

View Article

Image may be NSFW.
Clik here to view.

Uniquely (sort of) color text so you can see changes

$ function colorify() { n=$(bc <<< "$(echo ${1}|od -An -vtu1 -w100000000|tr -d ' ') % 7"); echo -e "\e[3${n}m${1}\e[0m"; } Colorify colors input by converting the text to a number and then...

View Article

Browsing latest articles
Browse All 8 View Live