I have a post written as below, which is rejected with "This post does not meet our quality standards". It was originally submitted with the title "handling errors in ex scripts without waiting for user input".

> 
> I'm trying to perform a search/replace with an ex script (targeting vim's ex implementation), as so:
> 
> 
> 
> ```
> ex -qc 'g/^[#][[:space:]]*$/d|x' file.txt
> 
> ```
> 
> However, when `file.txt` already contains no matching content, the script hangs; when run without `-q`, it also displays the error below:
> 
> 
> 
> ```
> E486: Pattern not found: ^[#][[:space:]]*$
> 
> ```
> 
> How can I build this script to continue (or, better, abort and immediately exit) on failure, rather than awaiting user input?
> 
> 
> 

I'm at something for a loss as to what rule this is likely to be triggering, or what I could do to improve it.