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

bash strings #172

Open
spaceone opened this issue Nov 16, 2021 · 3 comments
Open

bash strings #172

spaceone opened this issue Nov 16, 2021 · 3 comments

Comments

@spaceone
Copy link
Contributor

There should be way more examples for bash string usage:

${foo:2}
${foo%…}
${foo#…}
${foo##…}

etc.

@terminalforlife
Copy link
Contributor

terminalforlife commented Nov 17, 2021

Ah, parameter expansion is great. All but the first feature isn't exclusive to BASH though, as they're also available in Bourne Shell.

terminalforlife added a commit to terminalforlife/cheat.sheets that referenced this issue Nov 17, 2021
As suggested in chubin#172. There are plenty more things which can be
added, so this is more to get the ball rolling.
@chubin
Copy link
Owner

chubin commented Nov 18, 2021

This is a very very useful contribution. Maybe we should move it to bash/expansion or shell/expansion ?

@terminalforlife
Copy link
Contributor

Could do, since that would allow it to cover parameter expansion, brace expansion, tilde expansion, etc.

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

No branches or pull requests

3 participants