- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: csplit with /regex/-n
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
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
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
тАО07-07-2015 07:41 AM
тАО07-07-2015 07:41 AM
csplit with /regex/-n
Hello,
I have a script that I was running on a linux box that I had to move over to one of my hp-ux boxes. Part of the script uses csplit with /regex/-n {*} as parameters and this is giving me grief. I tested it using /regex/ {*} and /regex/+n {*} and this acted as expected, but /regex/-n {*} did not.
An example file is:
a
b
1
dog
c
d
2
dog
e
f
g
3
dog
h
i
j
The command is like csplit -s filex /dog/-1 {*}. The expected result is, and this is what I got on linux:
xx00
a
b
xx01
1
dog
c
d
xx02
2
dog
e
f
g
xx03
3
dog
h
i
j
However, this command gives me the error "reached limit on number of output files at arg {*}". If I instead use {n}, the xx00 file is as expected, however xx01 to xxNN is blank and xxN+1 has the remainder of the file.
I am using 11.31.
Any help is greatly appreciated.
Thank you.
- Tags:
- csplit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2015 10:57 AM
тАО07-08-2015 10:57 AM
Re: csplit with /regex/-n
csplit hasn't been patched on HP-UX 11.31 since 2009 (PHCO_39227). Possibly the Linux version has a fix that the HP-UX version doesn't?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2015 09:55 PM
тАО07-15-2015 09:55 PM
Re: csplit with /regex/-n
>Possibly the Linux version has a fix that the HP-UX version doesn't?
Most likely that gnu version never had the bug. Mine is: csplit (GNU coreutils) 8.5
I would suggest the OP contact Support and file a bug.