[Ilugc] {OT} reg shell command in perl prog

  • From: vnjp_ti@xxxxxxxxx (Prakash J)
  • Date: Mon, 21 Oct 2002 16:16:49 +0100 (BST)

Hi,

  In case if u r using system() function inside ur
perl script u cant get the path bcoz. system function
returns the return status of your shell command.  If
the command is successful it returns a zero otherwise
a nonzero value.  U should execute the command using
`(back tick) like this,
 
 $filepaths = `fine /user/prakash -name "ad*"`.

  the above command will redirect the output of the
shell command into the variable.

  Hope this helps.

Regards,
Prakash.

 --- Elanchezhian Sivanandam <elan@xxxxxxxxxxxx>
wrote: > hi,


       i want to find the hierarchial path of a
file
inside a perl script.
       the path can be found using the shell
command
       find [path] expression..
       and assign to a variable in perl.
       but it gives me a numerical value.
       how to get it as a string?

   thanks in advance.

-- 
cheers../elan

visit www.tamil.net for tamil fonts

_______________________________________________
To unsubscribe, email
ilugc-request@xxxxxxxxxxxxxxxxxx with 
"unsubscribe <password> address"
in the subject or body of the message.  
http://www.aero.iitm.ernet.in/mailman/listinfo/ilugc

________________________________________________________________________
Missed your favourite TV serial last night? Try the new, Yahoo! TV.
       visit http://in.tv.yahoo.com

Other related posts: