This is Bash-only:
echo "${@: -1}"
More Related Contents:
- How to delete from a text file, all lines that contain a specific string?
- How to print lines between two patterns, inclusive or exclusive (in sed, AWK or Perl)?
- How to use SSH to run a local shell script on a remote machine?
- Find and replace in file and overwrite file doesn’t work, it empties the file
- What are the uses of the exec command in shell scripts? [closed]
- How can I reverse the order of lines in a file?
- Insert line after match using sed
- Can GNU make handle filenames with spaces?
- What is the difference between $@ and $* in shell scripts?
- How to remove carriage return from a variable in shell script
- Using awk with variables
- Remove duplicate lines without sorting [duplicate]
- Run java jar file on a server as background process
- Shell command to find lines common in two files
- using alias in shell script? [duplicate]
- How to get the second column from command output?
- Passing argument containing space in shell script
- How to exclude this / current / dot folder from find “type d”
- Losing newline after assigning grep result to a shell variable
- How to ssh to vagrant without actually running “vagrant ssh”?
- How to check if a process is running inside docker container?
- \r character in shell script
- Make a keybinding to run previous or last shell commands
- Why 0 is true but false is 1 in the shell?
- How do I prevent root access to my docker container
- Remove part of path on Unix
- How do I determine if a web page exists with shell scripting?
- Pass groovy variable to shell script
- Awk replace a column with its hash value
- Call a Unix Script from Excel Vba