Category Archives: cut

Get filename and or extension

This script uses the filename and the extension of a file using shell scripts. This is useful when you have to rename a file or its extension. filenameextension.shraw download  #!/bin/sh # Name: filenameextension.sh # Author: kdguntu@gmail.com # Function: Show filename … Continue reading

Posted in bash, cut, linux, macosx, ubuntu | Tagged , , , , , | Leave a comment

Use a shell function, check if a file exists, true or false

This script uses a shell function to check if a file exists (-f). It returns 0 (zero) if the file exists and 1 if it does not exist. You can write your own check functions for checking if a directory … Continue reading

Posted in bash, cut, function, linux, regex, sed, Uncategorized, windows | Tagged , , | Leave a comment