Skip to main content

Backslash Unexpected backslash when converting from hex to binbinary number

I am trying to convert a hex line to binary in BASHbash, but mythe output includes a backslash when I do this. Can Can someone explain this to mewhy?

Specifics:

Input:

for i in 3D3D516343746D4D6D6C315669563362; do BIN=$(echo "ibase=16; obase=2; $i" | bc); echo $BIN; done

Output:

11110100111101010100010110001101000011011101000110110101001101011011\ 0101101100001100010101011001101001010101100011001101100010

Backslash when converting from hex to bin

I am trying to convert a hex line to binary in BASH, but my output includes a backslash when I do this. Can someone explain this to me?

Specifics:

Input:

for i in 3D3D516343746D4D6D6C315669563362; do BIN=$(echo "ibase=16; obase=2; $i" | bc); echo $BIN; done

Output:

11110100111101010100010110001101000011011101000110110101001101011011\ 0101101100001100010101011001101001010101100011001101100010

Unexpected backslash when converting from hex to binary number

I am trying to convert a hex line to binary in bash, but the output includes a backslash. Can someone explain why?

Input:

for i in 3D3D516343746D4D6D6C315669563362; do BIN=$(echo "ibase=16; obase=2; $i" | bc); echo $BIN; done

Output:

11110100111101010100010110001101000011011101000110110101001101011011\ 0101101100001100010101011001101001010101100011001101100010

edited title
Link
Jeff Schaller
  • 68.9k
  • 35
  • 122
  • 267

Backslash when converting from hex to bin in BASH?

edited tags
Link
Jeff Schaller
  • 68.9k
  • 35
  • 122
  • 267
Source Link
In_Circ
  • 11
  • 1
  • 4
Loading