You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the good project, which can help us make better/big-scale bash script.
When port the exist bash script to this new script, found require extra escape \, for example:
The command from bash script like:
grep -E 'NOT|PRODUCT-.*-build02.*\.out\.tgz '
If copy to hush, should be:
grep -E 'NOT|VMWARE-.*-build02.*\\.out\\.tgz '
Could we don't need this extra escape, which can help us copy the command between hush with bash easier?
The text was updated successfully, but these errors were encountered:
This happens because we allow escape sequences inside single quotes in Hush. In Bash, you can't do something like:
echo'\'this is $ingle quoted\''
But in Hush, you can. I guess that in practice this is not really that significant, because one can do:
echo"'"'this is $single quoted'"'"
And this will work in both.
I guess we can consider to remove escape sequences from single quote literals, and then your example would work seamlessly. Thanks for the suggestion, PRs welcome.
Thanks for the good project, which can help us make better/big-scale bash script.
When port the exist bash script to this new script, found require extra escape
\
, for example:The command from bash script like:
If copy to hush, should be:
Could we don't need this extra escape, which can help us copy the command between hush with bash easier?
The text was updated successfully, but these errors were encountered: