On 3/26/18 3:54 PM, f.de.kru...@gmail.com wrote:

> run 'sed -i "6a\find /srv/cowrie/log/ -mtime +7 -name \'cowrie.*\' -delete" 
> cowrietest'

Just so you understand how the quoting works here: you can't escape single
quotes with backslashes inside a single-quoted string. The \'cowrite.*\'
ends the first single-quoted string and inserts a single quote into the
command, since the backslash acts as an escape character in an unquoted
context. The double quote after -delete starts a new double-quoted string,
which is not terminated when the shell reaches the end of the script.

> ./aa.sh: line 16: unexpected EOF while looking for matching `"'
> ./aa.sh: line 17: syntax error: unexpected end of file


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to