HN
Hacker News
Top
New
Best
Ask
Show
Jobs
How to find last argument in a bash script | Hacker News Reader
How to find last argument in a bash script
faqs.org
1 point
·
vyuh
·
·
2 comments
Open article
Save
View on HN
kseistrup
·
In bash you could do
: "$@" last="$_"
kseistrup
·
You can use this e.g. to find the number of days in the current month:
: $(cal) numdays=$_
Reply on news.ycombinator.com