Write a shell script that accepts a filename as its argument. The named file is assumed to be a text file. The script should save the original content to a file with the original name with “.orig” appended (without the quotes). The file should be replaced with one that has all trailing spaces on each line removed. Do not use either sed or awk in your solution. Your script should do something intelligent if the named file does not exist, and should have reasonable exit codes.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here