I need the output of perldoc command collected to a file
[root@ser]# perldoc -l File::Scan::ClamAV > /usr/src/asas.txt
No documentation found for "File::Scan::ClamAV".
[root@ser]# cat /usr/src/asas.txt
[root@ser]#
I need the output of perldoc command collected to a file
[root@ser]# perldoc -l File::Scan::ClamAV > /usr/src/asas.txt
No documentation found for "File::Scan::ClamAV".
[root@ser]# cat /usr/src/asas.txt
[root@ser]#
What do you mean? I added to your code my comment:
[root@ser]# perldoc -l File::Scan::ClamAV > /usr/src/asas.txt
# here you redirect standard output (&1)
No documentation found for "File::Scan::ClamAV".
# only this is considered as "error" (&2)
[root@ser]# cat /usr/src/asas.txt # So its normal you have no output here...
[root@ser]#
If you wanted what you saw on your screen to be in the output file this is what you should have done:
perldoc -l File::Scan::ClamAV > /usr/src/asas.txt 2>&1
Thanks Vbe, It works very fine.