Redirecting output to new file for command "perldoc perllocal"


 
Thread Tools Search this Thread
Top Forums Programming Redirecting output to new file for command "perldoc perllocal"
# 1  
Old 02-02-2016
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
# 2  
Old 02-02-2016
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.
# 3  
Old 02-11-2016
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 02-11-2016
Quote:
Originally Posted by asak
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
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How do I redirect output from "find", either to a file or another command?

I'm trying to find out what happened to the rogue game that apt-get told me it installed, so I thought I would find the file. I went to the root and entered: find -name "rog*.*" I get a large number of lines saying my access is denied in various directories. I figure I'll practice my Unix... (14 Replies)
Discussion started by: arghvark
14 Replies

2. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

3. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

4. UNIX for Dummies Questions & Answers

Unix "look" Command "File too large" Error Message

I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this: $ look "string" "/home/patrick/filename.txt" However, this gives me the following message: "look: /home/patrick/filename.txt: File too large" So, I have two... (14 Replies)
Discussion started by: shishong
14 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Shell Programming and Scripting

Retrieve RAM memory size from "top" command output

Hi, I am trying to get the system RAM size from "top" command's output by the following but it is not working. top | sed "s/^Mem.**\(*\), *//" (10 Replies)
Discussion started by: royalibrahim
10 Replies

7. Shell Programming and Scripting

"Join" or "Merge" more than 2 files into single output based on common key (column)

Hi All, I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations: 1. I am restrained to 2 input files only. 2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Discussion started by: Katabatic
1 Replies

8. UNIX for Dummies Questions & Answers

Explanation of "total" field in "ls -l" command output

When I do a listing in one particular directory (ls -al) I get: total 43456 drwxrwxrwx 2 root root 4096 drwxrwxrwx 3 root root 4096 -rwxrwxr-x 1 nobody nobody 3701594 -rwxrwxr-x 1 nobody nobody 3108510 -rwxrwxr-x 1 nobody nobody 3070580 -rwxrwxr-x 1 nobody nobody 3099733 -rwxrwxr-x 1... (1 Reply)
Discussion started by: proactiveaditya
1 Replies

9. Shell Programming and Scripting

redirecting out of "at command" to file

hi, i am trying to redirect output of at command to a file. `at -k -f "menu.sh" now + 2 minutes` > at_out but when at_out is empty file. why? how can i do this. actually i want to get job id and want to store it in file. (4 Replies)
Discussion started by: anup13
4 Replies

10. Debian

Debian: doubt in "top" %CPU and "sar" output

Hi All, I am running my application on a dual cpu debian linux 3.0 (2.4.19 kernel). For my application: <sar -U ALL> CPU %user %nice %system %idle ... 10:58:04 0 153.10 0.00 38.76 0.00 10:58:04 1 3.88 0.00 4.26 ... (0 Replies)
Discussion started by: jaduks
0 Replies
Login or Register to Ask a Question