I can't get this sed command to work.
remote_file_path=$(tac $local_file_name | sed -nr '1,/$file_name/ d; /^\\/ { p; q }')
If I replace the single quotes with doubles, it breaks the rest of the command and I get this error:
sed: -e expression #1, char 31: unterminated address regex
Basically what I'm doing is using tac to search through a file backwards so that I can locate the preceeding line that starts with a backslash and assign it to the variable remote_file_path.
THank you