Solved

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

Posted on 2013-06-28
2
500 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 500 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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.

627 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