hi, i have just started with scripting and read several tutorials. But i have some doubts,

1) How do i print the file access permission(FAP),... not changing the FAP... but printing it ??

2) how to search for duplicate files in current directory ?

3) how do i validate a blank user input ? like if user doesnt enter any values and presses Enter, what condition do i put in an If construct ?

4) how to check what files were created today ?

thnx for reading the post.

Recommended Answers

All 3 Replies

Well it all depends on what way you want to go about it?

Will you use the windows script host?
A batchfile?

Well it all depends on what way you want to go about it?

Will you use the windows script host?
A batchfile?

i want to script for bash shell.

oh ok sorry, didnt look at the title properly :)

#!/bin/bash
echo "what info do you want"
read
ls -l $REPLY > /tmp/ls
cat /tmp/ls | awk '{print $1 $9}'

Will show the permissions on each file in the specifified dir. I think you can modify it for your pourpouse.

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.