bashHow to extract file extension
filename=/tmp/test.php
extension="${filename##*.}"ctrl + c"${filename##*.}"extracts file extension. Use |
More of Bash
- How to get time in "YYYY-MM-DD HH:II:SS" (year-month-date hour:minute:second) format
- How to get date in "YYYY-MM-DD" format
- Check if file exists
- Binet's Formula in bash
- How to count all lines in all files recursively
- Output bold text in console
- Urlencode string in bash
- How to check if a command exists
- Output italic text in console
See more codes...