Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backticks can be nested; remove from BUGS #50

Closed
wants to merge 1 commit into from

Conversation

Krush206
Copy link

@Krush206 Krush206 commented Aug 14, 2022

No description provided.

@Krush206
Copy link
Author

This nesting style can lead to confusion, since it must be doubled (as in Bourne Shells). It'd be nice to have a $() wrapper for it.

@Krush206
Copy link
Author

Apparently, this nesting style is very different. I can't seem to find a way to nest three or more commands, but this works: echo "`echo "\`"pwd"\`"`"

Either there's no way to do so or I'm failing to understand.

@Krush206
Copy link
Author

echo "`{echo,"'`pwd`'"}`"
This works too, but still no luck for multiple nesting.

@Krush206
Copy link
Author

echo "`echo "\"'`echo "\`"pwd"\`"`'\""`"
For three nests, this works. This is very complicated.

I'm still investigating further.

@Krush206
Copy link
Author

echo "`echo "\"'`echo "\"'\''`echo "\`"pwd"\`"`'\''\""`'\""`"
Finally made four nests. This nesting style is ridiculous, but does work.

@Krush206
Copy link
Author

https://bwass.org/bucket/IMG_20221127_093248.jpg
echo "`echo "\"'`echo "\"'\''`echo "\"'\'\\\'\''`echo "\"'\'\\\'\\\\\\\'\\\'\''`echo "\`"pwd"\`"`'\'\\\'\\\\\\\'\\\'\''\""`'\'\\\'\''\""`'\''\""`'\""`"

Use double quotes:
echo "`echo "\`"pwd"\`"`"
For multiple nesting:
echo "`echo "\"'`echo "\"'\''`echo "\"'\'\\\'\''`echo "\"'\'\\\'\\\\\\\'\\\'\''`echo "\`"pwd"\`"`'\'\\\'\\\\\\\'\\\'\''\""`'\'\\\'\''\""`'\''\""`'\""`"
@Krush206
Copy link
Author

Krush206 commented Jul 9, 2023

echo "`echo "\"\`"echo "\"\\\"\\\`\""echo "\"\\\"\\\\\\\"\\\\\\\`\\\"\""echo "\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\`\\\\\\\"\\\"\""echo "\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\`\\\\\\\\\\\\\\\"\\\\\\\"\\\"\""pwd"\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\`\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\`\\\\\\\\\\\\\\\"\\\\\\\"\\\\\\\`\\\\\\\"\\\"\\\`\\\"\"\`\""`"
This works too.

@zoulasc
Copy link
Member

zoulasc commented Nov 18, 2023

Updated.

@zoulasc zoulasc closed this Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants