0

$が続かないインスタンスを見つけようとしています!

それは$、エスケープする必要があります\\$か? これについてはわかりません-bashについてはまだ十分に知りません。[^!][^\\!][]

ag "\\$[^\!]"
bash: ^\!: syntax error: operand expected (error token is "^\!")

ag "\\$[^!]"
bash: !]: event not found

ag "\\$[^\\!]"
bash: ^\\!: syntax error: operand expected (error token is "^\\!")

ag "\\$[\\^\\!]"
bash: \\^\\!: syntax error: operand expected (error token is "\\^\\!")

ag "\\$[\^\!]"
bash: \^\!: syntax error: operand expected (error token is "\^\!")

これらは結果を生成しません:

ag "\\$\\[\\^\\!\\]"
ag "\\$\\[\\^\\!\\]"
ag "\\$\[\\^\\!\]"
ag "\\$\[\^\!\]"
ag "\$\[\^\!\]"
ag "\\$\[\^\!\]"
4

1 に答える 1