0

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.

2
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by jbennet
0

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

Will you use the windows script host?
A batchfile?

0

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.

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.