Write a shell script which accepts a file name as an argument (assume file to be present in the same directory) and perform following operations:

->check if the file has writable permission ->if read only then print, File is readable and following are content: ->if writable then, append it with the line Newly appended line … and display it ->if directory, then display the listing of files