escape shell variables

  1. Sopalajo

    How can I replace string by using variables with special characters inside?

    Case example: $ variable="$(ls -la)" So the resulting variable stores some characters, like new line ones: $ echo "$variable" total 8 drwxr-xr-x 2 luis wheel 512 May 27 04:15 . drwxrwxrwt 15 root wheel 1536 May 27 04:15 .. When I try to replace a string with this variable: $ echo...
Back
Top