The task is i have a folder which has some text files
i need to write a shell script which takes this folder as input and in the out put it should give
me the filenames,lastmodified date,and the lastline in each particular file
help me asap

hey i have written the following code can any of u assure me that it works perfect

# !/bin/bash
echo -n "Enter Your Folder With Full Path : "
read path
cd $path
ls -c -lt | more
tail -1 *.*

Just from a quick look I can tell you that unless $User inputs an absolute path or whatever your looking for is in your dir it will error out there also I dont think it is a good idea to call that var $path unless what you have posted is pseudo code. Lastly I think the tail command might need tweaking

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.