Sunday, 18 November 2012

Accept filename and displays last modification time if file exists, otherwise display appropriate message


4 comments:

  1. #!/bin/bash

    echo -n "Enter name of the file:"
    read filename
    if [ -e $filename ]
    then
    echo 'Last modification time is' `ls -l $filename | cut -d" " -f 6,7,8`
    else
    echo "file does not exist"
    fi

    ReplyDelete
  2. Thank you for upload required code

    ReplyDelete

Ad

google analystics