Unix/Linux Go Back    


Programming Post questions about C, C++, Java, SQL, and other programming languages here.

Redirecting output to new file for command "perldoc perllocal"

Programming


Tags
perl, perldoc

Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 02-02-2016   -   Original Discussion by asak
asak's Unix or Linux Image
asak asak is offline
Registered User
 
Join Date: Jun 2011
Last Activity: 5 April 2018, 5:50 PM EDT
Location: korea
Posts: 48
Thanks: 12
Thanked 0 Times in 0 Posts
Redirecting output to new file for command "perldoc perllocal"

Hi,

I have to redirect output of the command "perldoc perllocal" to new file which
contains all the perl module installed.

Currently using


Code:
perldoc perllocal >> mod_data

This does not contain all perl modules installed locally on machine, and each character is doubled.

Please help me out to list all perl modules installed in machine , using perl script.

Thanks,
asak
Sponsored Links
    #2  
Old Unix and Linux 02-02-2016   -   Original Discussion by asak
Aia's Unix or Linux Image
Aia Aia is offline
Registered User
 
Join Date: May 2008
Last Activity: 13 March 2018, 11:04 PM EDT
Posts: 1,713
Thanks: 49
Thanked 663 Times in 619 Posts
Please, try:


Code:
perldoc -otext -d mod_data perllocal

If that does work, try your luck with brute force:



Code:
perl -MFile::Find=find -MFile::Spec::Functions -le 'find { wanted => sub { print canonpath $_ if /\.pm$/ }, no_chdir => 1 }, @INC' > mod_data

Note: There is no need for a >> unless there's content in mod_data you do not want to overwrite.
Sponsored Links
    #3  
Old Unix and Linux 02-11-2016   -   Original Discussion by asak
asak's Unix or Linux Image
asak asak is offline
Registered User
 
Join Date: Jun 2011
Last Activity: 5 April 2018, 5:50 PM EDT
Location: korea
Posts: 48
Thanks: 12
Thanked 0 Times in 0 Posts
Thanks, but when i tried - i am getting permission issue. can you please help


Code:
[root@scsos0001413001 ~]# perldoc -otext -d mod_data perllocal
Can't write-open mod_data: Permission denied at /opt/lib/perl5/5.14.0/Pod/Perldoc.pm line 1597.

    #4  
Old Unix and Linux 02-11-2016   -   Original Discussion by asak
Aia's Unix or Linux Image
Aia Aia is offline
Registered User
 
Join Date: May 2008
Last Activity: 13 March 2018, 11:04 PM EDT
Posts: 1,713
Thanks: 49
Thanked 663 Times in 619 Posts
Quote:
Originally Posted by asak View Post
Thanks, but when i tried - i am getting permission issue. can you please help


Code:
[root@scsos0001413001 ~]# perldoc -otext -d mod_data perllocal
Can't write-open mod_data: Permission denied at /opt/lib/perl5/5.14.0/Pod/Perldoc.pm line 1597.
You need to find out why it can not create the file mod_data in the directory that you are executing the command perldoc
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Using "mailx" command to read "to" and "cc" email addreses from input file asjaiswal UNIX for Dummies Questions & Answers 2 10-11-2014 09:32 PM
Unix "look" Command "File too large" Error Message shishong UNIX for Dummies Questions & Answers 14 05-30-2011 03:47 PM
awk command to replace ";" with "|" and ""|" at diferent places in line of file shis100 Shell Programming and Scripting 7 03-16-2011 08:59 AM
Explanation of "total" field in "ls -l" command output proactiveaditya UNIX for Dummies Questions & Answers 1 04-18-2010 01:40 AM
redirecting out of "at command" to file anup13 Shell Programming and Scripting 4 09-30-2008 03:46 AM



All times are GMT -4. The time now is 02:21 AM.