- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: File Truncate
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
06-22-2000 05:52 AM
06-22-2000 05:52 AM
File Truncate
I have a file that has in the midle STORAGE WHAT_EVER....; and I would like to know if you know any script that can be run to truncate the file from where says STORAGE but do not delete (;).
Thanks,
A Cossa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2000 06:03 AM
06-22-2000 06:03 AM
Re: File Truncate
Please describe this problem better. Are you talking about file contents or file name, is file being held open by some process?
Regards,
TT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2000 06:41 AM
06-22-2000 06:41 AM
Re: File Truncate
The text below is on vi editor. What I want is to delete on the text where found STORAGE until before any (;)
CREATE TABLE "ENV"."TE01_MESSAGE" ("CE01_MESSAGE_DATE" DATE NOT NULL
ENABLE, "CE01_FUNCTION_NAME" VARCHAR2(25) NOT NULL ENABLE,
"CE01_TYPE" VARCHAR2(1) NOT NULL ENABLE, "CE01_MESSAGE" VARCHAR2(200)
NOT NULL ENABLE, "CE01_MODULE_NAME" VARCHAR2(36),
"CE01_PACKAGE_ERROR_NUMBER" VARCHAR2(36), "CE01_ORACLE_USER"
VARCHAR2(10)) PCTFREE 5 PCTUSED 60 INITRANS 5 MAXTRANS 255 LOGGING
STORAGE(INITIAL 3727360 NEXT 745472 MINEXTENTS 1 MAXEXTENTS 5
PCTINCREASE 5 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "ENV_DATA2" ;
CREATE TABLE "ENV"."TE07_APPLICATION" ("CE07_USER_ID" VARCHAR2(15)
NOT NULL ENABLE, "CE07_APPL_NAME" VARCHAR2(25) NOT NULL ENABLE,
"CE07_APPL_PROGRAM" VARCHAR2(9) NOT NULL ENABLE, "CE07_DATABASE"
VARCHAR2(5) NOT NULL ENABLE, "CE07_UID" VARCHAR2(15) NOT NULL ENABLE,
"CE07_DMOD" DATE NOT NULL ENABLE) PCTFREE 5 PCTUSED 60 INITRANS 5
MAXTRANS 255 LOGGING STORAGE(INITIAL 32768 NEXT 8192 MINEXTENTS 1
MAXEXTENTS 5 PCTINCREASE 5 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL
DEFAULT) TABLESPACE "ENV_DATA2" ;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2000 08:15 AM
06-22-2000 08:15 AM
Re: File Truncate
#! /usr/bin/ksh
sed 's/STORAGE[^;]*;/;/' | sed -n '/STORAGE/{
s/STORAGE.*//
p
: loop
n
s/[^;]*;/;/
t done
b loop
: done
p
b
}
p
'
exit 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2000 03:05 PM
06-22-2000 03:05 PM
Re: File Truncate
:%s/STORAGE.*;/;/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2000 11:29 PM
06-22-2000 11:29 PM
Re: File Truncate
A Cossa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2000 05:11 AM
06-23-2000 05:11 AM
Re: File Truncate
Augusto, the script will read from standand in and write to standard out. So call the script "fixup" or something and then do:
fixup < inputfile > outputfile