![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Finding difficult in installing gcc-3.4.6 complier on Solaris 10. | susainaj | SUN Solaris | 4 | 07-11-2008 10:35 AM |
| so difficult question about using grep | shrimpy | UNIX for Dummies Questions & Answers | 2 | 03-22-2008 12:19 AM |
| difficult sed command | Dave724001 | UNIX for Advanced & Expert Users | 17 | 09-29-2006 05:11 AM |
| difficult time differences | Lokesha | SUN Solaris | 1 | 06-20-2006 10:42 AM |
| Difficult Filtering Problem | Piyush | UNIX for Advanced & Expert Users | 1 | 06-30-2003 04:06 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hi,
I'm a beginners, this is one of my first script, it's easy, but I don't know how to write this script: The script receive in input 4 parameters: 1) user_name 2) r and/or w and/or x ( rwx, rw, x, ....) 3) u and/or g and/or o ( u, uo, ugo, ...) 4) the path name The script print a list of normal files ( “-” with ls) created by user_name, with at least the permission specified as 2nd parameters for the groups specified as 3rd parameter , starting from the path name passed as 4th parameter. Example of permission: giving: rw, u I look for “ rw-......“ using ls -lr (. is a generic character) giving: rw, ugo I look for “ rw-rw-rw- “ I tryed in many ways, but for example i f I execute a simple script like this: permission=-rw-r--r-- ls -lR | grep '^-$permission' The script don't print anything on the screen, but I type in the shell: ls -lR | grep '^-rw-r--r--' the output is correct. Moreover I don't know how to separate the colums of ls -lR using CUT (I suppose) to select oly the rows that are created by the user So I understood I need help. Please help me. PS: i have to write many script, and this is the simplest, so if I don't know how to write this, I'll never be able to write the others.. Last edited by DNAx86; 01-07-2008 at 01:36 PM.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|