Skip to main content
2 of 2
Active reading.
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

This is another way and is good to use with some text editors that are unable to correctly highlight every intricate code you create:

read -r -d '' str < <(cat somefile.txt) echo "${#str}" echo "$str" 
Aquarius Power
  • 4k
  • 5
  • 39
  • 72