I have this file I want to add a line with and I seem to have a problem when using alt characters. Here's the script piece:
#testfile.txt
Main
├────►projectA
└────►projectC
sed "/├────►projectA/a ├────►projectB/" testfile.txt
sed doesn't seem to find the "├────►projectA" portion. Grep won't even find it.
grep "├────►projectA" testfile.txt
grep returns nothing.
So how can you make it found so I can add my line below it?
Edit: I found my problem. I was using the wrong character in my sed command. This script is on a different system so I had to make an example off the top of my head.
I'm trying to add spaces as well after the /a but it trims it. Is there a way to preserve the spaces?
(e.g. "[5 spaces] ├────►projectB")
I can't add spaces to the above line because stakoverflow formatting trims it as well. So I say [5 spaces] to represent the amount of whitespace.