Tag Info

New answers tagged

1

You were almost there with your first attempt. The problem is that adb unhelpfully adds a carriage return at the end of every line. You can't see it in the basic usage where the output is printed to the terminal, because a carriage return at the end of a line has no visual effect (the carriage return moves the cursor to the beginning of the current line, but ...


6

sed 's:\\1\\:\ :g' file you will have to escape the backslashes in your match pattern. In the replacement, that's a backslash followed by a literal newline character. Some sed implementations, like GNU sed also support \n there as an non-standard alternative. Output "evSchema" "UAT" "evSN" "uadb" "evDirsep" "/" "evRootPath" "/work_area/APP_UAT/" ...


1

This is a clue to the problem: test.sh: line 98: syntax error near unexpected token `done' 'est.sh: line 98: `done < isam_subrack2.txt 2> /dev/null That second line would normally read like this test.sh: line 98: `done < isam_subrack2.txt 2> /dev/null' As you can see, the trailing quote mark from the error message is at the beginning of ...


6

It appears like the empty lines contain an invisible (unprintable) character, and the server is trying to run it as if it were the name of a command; hence the error : not found [No such file or directory]. Delete the empty lines or ensure they're really empty. Edit: OP's comment confirms that it is indeed the case, as the code was written under Windows. On ...



Top 50 recent answers are included