- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- perl script to locate files
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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
12-11-2003 07:38 PM
12-11-2003 07:38 PM
I have put my delimited file inside one of the directory. I will loop through all the file with *csv extension. For each new file I will create a new worksheet inside the workbook excel file.
currently I am having problem as the $files always said no such file ...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2003 07:45 PM
12-11-2003 07:45 PM
Re: perl script to locate files
Is there anyway in perl that I can filter the name
/omrpt/abc/12-03-bac_hpsgqa_QAS.csv
to become bac_hpsgqa_qas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2003 07:45 PM
12-11-2003 07:45 PM
Re: perl script to locate files
foreach my $file (@files) {
open (TABFILE, $files) or die "$files: $!";
$file should be $files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2003 07:46 PM
12-11-2003 07:46 PM
Re: perl script to locate files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2003 07:52 PM
12-11-2003 07:52 PM
Solution#!/usr/bin/perl
$DATA="/omrpt/abc/12-03-bac_hpsgqa_QAS.csv";
($RESULT)=($DATA=~m#.*/(.+)\.csv#);
print "result $RESULT\n";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2003 08:08 PM
12-11-2003 08:08 PM
Re: perl script to locate files
The code that you suggest work very well. Thank for your help.
Just wondering is it possible to remove the number as well
12-03- can it be removed as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2003 08:21 PM
12-11-2003 08:21 PM
Re: perl script to locate files
#!/usr/bin/perl
$DATA="/omrpt/abc/12-03-bac_hpsgqa_QAS.csv";
($RESULT)=($DATA=~m#.*\d-(.+)\.csv#);
print "result $RESULT\n";