bashHow to extract file extension
filename=/tmp/test.php
extension="${filename##*.}"ctrl + c"${filename##*.}"extracts file extension. Use |
More of Bash
- How to check if a command exists
- How to get time in "HH:II:SS" (hour:minute:second) format
- Binet's Formula in bash
- How to check if a string starts with a specific value
- Output bold text in console
- Check if file exists
- Change directory permissions recursively using chmod in bash
- Urlencode string in bash
- Change file owner in bash
- Quickly create big file
See more codes...