User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: Jan 2007
Posts: 18
Reputation: livingsword is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
livingsword livingsword is offline Offline
Newbie Poster

Help Printing file access permission....

  #1  
Apr 25th, 2007
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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2005
Location: Dundee, Scotland
Posts: 12,883
Reputation: jbennet is just really nice jbennet is just really nice jbennet is just really nice jbennet is just really nice 
Rep Power: 32
Solved Threads: 304
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: Printing file access permission....

  #2  
Apr 25th, 2007
Well it all depends on what way you want to go about it?

Will you use the windows script host?
A batchfile?
TRY MY SUGGESTIONS AT YOUR OWN RISK

Master of puppets Im pulling your strings, blinded by me, you cant see a thing. Master! Master!
Reply With Quote  
Join Date: Jan 2007
Posts: 18
Reputation: livingsword is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
livingsword livingsword is offline Offline
Newbie Poster

Re: Printing file access permission....

  #3  
Apr 26th, 2007
Originally Posted by jbennet View Post
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.
Reply With Quote  
Join Date: Apr 2005
Location: Dundee, Scotland
Posts: 12,883
Reputation: jbennet is just really nice jbennet is just really nice jbennet is just really nice jbennet is just really nice 
Rep Power: 32
Solved Threads: 304
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: Printing file access permission....

  #4  
Apr 26th, 2007
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.
TRY MY SUGGESTIONS AT YOUR OWN RISK

Master of puppets Im pulling your strings, blinded by me, you cant see a thing. Master! Master!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Shell Scripting Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Shell Scripting Forum

All times are GMT -4. The time now is 12:57 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC