- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Scrip error
Operating System - HP-UX
1752794
Members
6264
Online
108789
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2009 06:27 AM
тАО01-06-2009 06:27 AM
Scrip error
Hi mates,
Happy New Year For everybody!!
I have a problem when I try to run the following script:
#!/usr/bin/ksh
#--------------------------------------------------------------------------------------
# Created by: Victor Burguillos
#
# Description: Filters a syslog file searching for lines generated during the pass
# N days before today. The filter ommits the results from TODAY. The search starts
# with the registers generated yesterday
#--------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------
# Parameters
#--------------------------------------------------------------------------------------
file_syslog=$1 # file to filter, including path
cmd_egrep="/usr/bin/egrep" # file to egrep, including path
days_before=2 # number of days before since today
#--------------------------------------------------------------------------------------
i=0
while [ $i -lt $days_before ]; do
date=$(perl -e "use POSIX;print strftime \"%b %e\",localtime time-($i*24*60*60);");
let i=i+1
if [[ $i -eq 1 ]]; then
search_filter=$date;
else
search_filter="$search_filter|$date";
fi
done
# This is the final result, an egrep with the dates as parameters, separated by an OR
$cmd_egrep "$search_filter" $file_syslog.
The erro that show me when I run this scrip is the following:
Can't locate POSIX.pm in @INC (@INC contains: /opt/perl5/lib/5.00502/PA-RISC1.1 /opt/perl5/lib/5.00502 /opt/perl5/lib/site_perl/5.005/PA-RISC1.1 /opt/perl5/lib/site_perl/5.005 .) at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
Can't locate POSIX.pm in @INC (@INC contains: /opt/perl5/lib/5.00502/PA-RISC1.1 /opt/perl5/lib/5.00502 /opt/perl5/lib/site_perl/5.005/PA-RISC1.1 /opt/perl5/lib/site_perl/5.005 .) at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
egrep: Unknown error
Any information about this???
Thanks
Happy New Year For everybody!!
I have a problem when I try to run the following script:
#!/usr/bin/ksh
#--------------------------------------------------------------------------------------
# Created by: Victor Burguillos
#
# Description: Filters a syslog file searching for lines generated during the pass
# N days before today. The filter ommits the results from TODAY. The search starts
# with the registers generated yesterday
#--------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------
# Parameters
#--------------------------------------------------------------------------------------
file_syslog=$1 # file to filter, including path
cmd_egrep="/usr/bin/egrep" # file to egrep, including path
days_before=2 # number of days before since today
#--------------------------------------------------------------------------------------
i=0
while [ $i -lt $days_before ]; do
date=$(perl -e "use POSIX;print strftime \"%b %e\",localtime time-($i*24*60*60);");
let i=i+1
if [[ $i -eq 1 ]]; then
search_filter=$date;
else
search_filter="$search_filter|$date";
fi
done
# This is the final result, an egrep with the dates as parameters, separated by an OR
$cmd_egrep "$search_filter" $file_syslog.
The erro that show me when I run this scrip is the following:
Can't locate POSIX.pm in @INC (@INC contains: /opt/perl5/lib/5.00502/PA-RISC1.1 /opt/perl5/lib/5.00502 /opt/perl5/lib/site_perl/5.005/PA-RISC1.1 /opt/perl5/lib/site_perl/5.005 .) at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
Can't locate POSIX.pm in @INC (@INC contains: /opt/perl5/lib/5.00502/PA-RISC1.1 /opt/perl5/lib/5.00502 /opt/perl5/lib/site_perl/5.005/PA-RISC1.1 /opt/perl5/lib/site_perl/5.005 .) at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
egrep: Unknown error
Any information about this???
Thanks
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2009 06:44 AM
тАО01-06-2009 06:44 AM
Re: Scrip error
Hi:
> Can't locate POSIX.pm in @INC (@INC contains: /opt/perl5/lib/5.00502/PA-RISC1.1 /opt/perl5/lib/5.00502 /opt/perl5/lib/site_perl/5.005/PA- ...
This says that the POSIX module can't be found in your Perl distribution. Your version is old, although I believe it should have supported the module. I would fetch and install a current one:
http://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=PERL
The Perl 5.8.8 version is rock-solid.
Regards!
...JRF...
> Can't locate POSIX.pm in @INC (@INC contains: /opt/perl5/lib/5.00502/PA-RISC1.1 /opt/perl5/lib/5.00502 /opt/perl5/lib/site_perl/5.005/PA- ...
This says that the POSIX module can't be found in your Perl distribution. Your version is old, although I believe it should have supported the module. I would fetch and install a current one:
http://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=PERL
The Perl 5.8.8 version is rock-solid.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2009 06:46 AM
тАО01-06-2009 06:46 AM
Re: Scrip error
Hi James,
I download this version let me check and let you know when I will finish
I download this version let me check and let you know when I will finish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2009 08:15 AM
тАО01-06-2009 08:15 AM
Re: Scrip error
James.
Thank you very much its works.
Thank you very much its works.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP