•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 456,418 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,635 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser: Programming Forums
Views: 1451 | Replies: 3
![]() |
•
•
Join Date: Jan 2007
Posts: 18
Reputation:
Rep Power: 2
Solved Threads: 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.
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.
•
•
Join Date: Apr 2005
Location: Dundee, Scotland
Posts: 12,883
Reputation:
Rep Power: 32
Solved Threads: 304
•
•
Join Date: Apr 2005
Location: Dundee, Scotland
Posts: 12,883
Reputation:
Rep Power: 32
Solved Threads: 304
oh ok sorry, didnt look at the title properly 
Will show the permissions on each file in the specifified dir. I think you can modify it for your pourpouse.

#!/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.
TRY MY SUGGESTIONS AT YOUR OWN RISK
Master of puppets Im pulling your strings, blinded by me, you cant see a thing. Master! Master!
Master of puppets Im pulling your strings, blinded by me, you cant see a thing. Master! Master!
![]() |
•
•
•
•
•
•
•
•
DaniWeb Shell Scripting Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- problems with reading random access line from a file (C++)
- No Access Permission for loggoing onto my Workgroup (Networking Hardware Configuration)
- Random shared file access details....... (Visual Basic 4 / 5 / 6)
- how willl i be able to save a specific record into my database file in ms access (Java)
- file access problem(access and oracle) (C++)
- reading and printing a file to screen in C (C)
Other Threads in the Shell Scripting Forum
- Previous Thread: send mail after script finishes running
- Next Thread: Korn Shell Script for deleting files older than 2 months



Linear Mode