Linux / UNIX Tech Support Forum
This is a discussion on perl script to find the owners different than root in a directory within the Shell scripting forums, part of the Development/Scripting category; Hi all, i am new to perl and i want to make this work in perl.. please help is it ...
|
|||||||
| Shell scripting You can discuss the shell scripting, request shell scripts and scripting techniques |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi all,
i am new to perl and i want to make this work in perl.. please help is it possible to save the output of a unix command executed in perl to be saved in hash variable.. like i have the command `find $mypath ! -user mainuser -printf \"\%u \%h\\n\"`; this will print all the users other than mainuser with their paths. example this is the output: john /johnsaddress/ john /johnspincode/ john /johnscity/ james /jamesaddress/ james /jamespincode/ i want to parse the file (1st column) and save the strings only once along with their whole data. like above the result should be john and james stored in some variable and their corresponding data also stored. so is possible to capture directly the result into a hash(hash of arrays) which stores the key as username and all the paths of a particular user as values. thanks for ur help and suggestions in advance |
| Sponsored Links | ||
|
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Find Unix Linux File / Directory by date And Then Copy / Move File | asim.mcp | CentOS / RHEL / Fedora | 1 | 10-08-2008 03:30 AM |
| Change root password using perl script? | Raj1 | Solaris/OpenSolaris | 8 | 13-06-2008 11:01 PM |
| Implementation of find command in Perl | Bhushan | Shell scripting | 2 | 22-08-2007 12:15 PM |
| How to Prevent Uploading Perl Scripts in /tmp Directory | bipinkdas | Web servers | 1 | 25-06-2007 08:57 PM |
| how to find perl version | All about FreeBSD/OpenBSD/NetBSD | 1 | 28-01-2006 05:20 PM | |