views:

53

answers:

2

How do you express a byte sequence from the command line? i.e like you would in PHP with the following:

<?php
echo "\xC2\xA3"

usage: for passing a Unicode string to a script or program. The above example is the UK pound sign "£"

+1  A: 
echo -e "\xC2\xA3"

or

echo $'\xc2\xa3'

the latter may be bash-specific, I don't remember.

Michael Krelin - hacker
the dollar format is perfect for my use. thanks a lot.
Tim Whitlock
A: 
$ printf "\xC2\xA3"
£
ghostdog74