Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

I need to add a line with a slash after each paragraph in this script

Posted on 2013-06-28
2
Medium Priority
?
505 Views
Last Modified: 2013-06-28
Hi experts.
I have the following script (Is much longer than this, so I can't do it manually, ), and I have to add a line that will have only a slash after each paragraph:

The name of the script is test.sql.  
Aix 6.1

BEGIN DBMS_STATS.GATHER_TABLE_STATS(
                ownname => 'SYSADM'
                ,tabname => 'PSACCESSLOG'
                ,estimate_percent => NULL
                ,block_sample => FALSE
                ,method_opt => 'FOR ALL INDEXED COLUMNS'
                ,degree => DBMS_STATS.AUTO_DEGREE
                ,cascade => FALSE
         );END;

BEGIN DBMS_STATS.GATHER_TABLE_STATS(
                ownname => 'SYSADM'
                ,tabname => 'PSAPMSGPUBCON'
                ,estimate_percent => NULL
                ,block_sample => FALSE
                ,method_opt => 'FOR ALL INDEXED COLUMNS'
                ,degree => DBMS_STATS.AUTO_DEGREE
                ,cascade => FALSE
         );END;

BEGIN DBMS_STATS.GATHER_TABLE_STATS(
                ownname => 'SYSADM'
                ,tabname => 'PSAPMSGPUBERR'
                ,estimate_percent => NULL
                ,block_sample => FALSE
                ,method_opt => 'FOR ALL INDEXED COLUMNS'
                ,degree => DBMS_STATS.AUTO_DEGREE
                ,cascade => FALSE
         );END;
0
Comment
Question by:LindaC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 2000 total points
ID: 39284292
Assuming that the end of each paragraph is indicated by a line containing ");END;"

awk '{if ( $0~");END;") print $0 "\n/"; else print $0}' test.sql > new.test.sql
0
 
LVL 8

Author Closing Comment

by:LindaC
ID: 39284307
Thank you!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question