linux - Regex remove comments but not shebang -


i got regex removes comments in bash using regex code

'/^\#/d' 

but removes #! should not because it's not comment tag shebang

so how can done ignore #! in regex?

this line remove every comment starting # not followed !.

'/^#[^!]/d' 

Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -