Sponsored Content
Full Discussion: search and replace
Top Forums Shell Programming and Scripting search and replace Post 302189977 by a.suryakumar on Monday 28th of April 2008 10:15:15 AM
Old 04-28-2008
search and replace

i have the following create table definition ,the shell script has to search for the first column name of the create table definition in the file and explicitly add primary index (first column name) at the end i.e before ";"

it has to search through all the files (say 20 files) and has to modifiy as per the above requirement
Could anyone please help me

Before modification:

create table t_surya
(service_number varchar(15) character set LATIN not casespecific not null
,exch_id char(4) character set LATIN not casespecific not null
,lar_account_number varchar(15) character set LATIN not casespecific not null
,lar_acct_id integer
,lar_owning_cost_ctr smallint
,lar_cust_type char(1) character set LATIN not casespecific
,lar_plan_cd varchar(4) character set LATIN not casespecific
,ld_plan_cd varchar(4) character set LATIN not casespecific
,lar_date_of_birth date format 'YYYY-MM-DD'
,lar_account_name_1 varchar(100) character set LATIN not casespecific
,lar_account_name_2 varchar(100) character set LATIN not casespecific
,lar_bill_cycle_freq_cd char(1) character set LATIN not casespecific
,lar_ar_account_no integer
,dsl_cust_id integer
,dsl_acct_id integer
,dsl_cust_type_id byteint
,dsl_serv_type varchar(10) character set LATIN not casespecific
,dsl_serv_status char(1) character set LATIN not casespecific
,dsl_date_of_birth date format 'YYYY-MM-DD'
,dsl_cust_name varchar(100) character set LATIN not casespecific
,bundle_flag char(1) character set LATIN not casespecific
,fnn_eligibility_flag char(1) character set LATIN not casespecific
,reject_rsn_cd varchar(50) character set LATIN not casespecific)
;

After Modification:

create set table t_surya
(service_number varchar(15) character set LATIN not casespecific not null
,exch_id char(4) character set LATIN not casespecific not null
,lar_account_number varchar(15) character set LATIN not casespecific not null
,lar_acct_id integer
,lar_owning_cost_ctr smallint
,lar_cust_type char(1) character set LATIN not casespecific
,lar_plan_cd varchar(4) character set LATIN not casespecific
,ld_plan_cd varchar(4) character set LATIN not casespecific
,lar_date_of_birth date format 'YYYY-MM-DD'
,lar_account_name_1 varchar(100) character set LATIN not casespecific
,lar_account_name_2 varchar(100) character set LATIN not casespecific
,lar_bill_cycle_freq_cd char(1) character set LATIN not casespecific
,lar_ar_account_no integer
,dsl_cust_id integer
,dsl_acct_id integer
,dsl_cust_type_id byteint
,dsl_serv_type varchar(10) character set LATIN not casespecific
,dsl_serv_status char(1) character set LATIN not casespecific
,dsl_date_of_birth date format 'YYYY-MM-DD'
,dsl_cust_name varchar(100) character set LATIN not casespecific
,bundle_flag char(1) character set LATIN not casespecific
,fnn_eligibility_flag char(1) character set LATIN not casespecific
,reject_rsn_cd varchar(50) character set LATIN not casespecific)
primary index (service_number)
;
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

search and replace

hi all, the problem is like this...... i setup a file (Env.txt) which handles all the values. NAME1=xxxxxx, where xxxxx is the value NAME2=xxxxxx GGGGG=uusufu I have 6 files, where i will append the values from env.txt. These files has no specific format. all i want is to append the... (1 Reply)
Discussion started by: tungaw2004
1 Replies

2. Shell Programming and Scripting

Perl: Search for string on line then search and replace text

Hi All, I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text. An example of 4 lines in my file is: 1. MatchText_randomNumberOfText moreData ReplaceMe moreData 2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Discussion started by: Crypto
4 Replies

3. Shell Programming and Scripting

Search and replace

I have a script which has several occurences of statement like command: $UCMDPATH/xyz abc I would like to replace the entire line starting from $UCMDPATH with the ls -ltr command eg: Prior to change:: command: $UCMDPATH/xyz abc After change: command: ls -ltr Is there a way to do... (12 Replies)
Discussion started by: jobbyjoseph
12 Replies

4. Shell Programming and Scripting

awk - replace number of string length from search and replace for a serialized array

Hello, I really would appreciate some help with a bash script for some string manipulation on an SQL dump: I'd like to be able to rename "sites/WHATEVER/files" to "sites/SOMETHINGELSE/files" within the sql dump. This is quite easy with sed: sed -e... (1 Reply)
Discussion started by: otrotipo
1 Replies

5. Shell Programming and Scripting

Search and Replace

Hi!!! I have following xml file with 3 sections. aaa1bbb-ccc default aaa1bbbdd default 0 11 23 * * aaa2bbb-ccc default aaa2bbbdd default 0 11 23 * * aaa3bbb-ccc default aaa3bbbdd default 0 15 23 * * (15 Replies)
Discussion started by: tdev457
15 Replies

6. Shell Programming and Scripting

perl search and replace - search in first line and replance in 2nd line

Dear All, i want to search particular string and want to replance next line value. following is the test file. search string is tmp,??? ,10:1 "???" may contain any 3 character it should remain the same and next line replace with ,10:50 tmp,123 --- if match tmp,??? then... (3 Replies)
Discussion started by: arvindng
3 Replies

7. UNIX for Dummies Questions & Answers

Search and Replace

I am trying to search and replace using two different files with strict search rules. One file contain some data and the other file contain some numbers as shown below. DataFile.txt >L1_T1 text data... text data.. >L1_T1 text data... text data.. >L1_T1 text data... text data.. ........ (4 Replies)
Discussion started by: Fahmida
4 Replies

8. UNIX for Dummies Questions & Answers

Help with search and replace or search only of / in vi

Hi all, I am editing a config file in vi that has a / on it. At the moment, search and replace looks alright as am able to use a # as a temporary separator, i.e. :,$s#/u01/app#/u02/app#g For doing a search, I have to escape the / do. So if I want to search for /u01/app, I am having to do... (2 Replies)
Discussion started by: newbie_01
2 Replies

9. Shell Programming and Scripting

Vi search and replace

Hi, I need help with search and replace for the following string using vi .. if ];then to if ];then can this be done in one search and replace or need multiple ? Thanks (3 Replies)
Discussion started by: talashil
3 Replies

10. Shell Programming and Scripting

Nested search in a file and replace the inner search

Hi Team, I am new to unix, please help me in this. I have a file named properties. The content of the file is : ##Mobile props east.url=https://qa.east.corp.com/prop/end west.url=https://qa.west.corp.com/prop/end south.url=https://qa.south.corp.com/prop/end... (2 Replies)
Discussion started by: tolearn
2 Replies
ISO_8859-14(7)						     Linux Programmer's Manual						    ISO_8859-14(7)

NAME
iso_8859-14 - ISO 8859-14 character set encoded in octal, decimal, and hexadecimal DESCRIPTION
The ISO 8859 standard includes several 8-bit extensions to the ASCII character set (also known as ISO 646-IRV). ISO 8859-14 encodes the characters used in Celtic languages. ISO 8859 alphabets The full set of ISO 8859 alphabets includes: ISO 8859-1 West European languages (Latin-1) ISO 8859-2 Central and East European languages (Latin-2) ISO 8859-3 Southeast European and miscellaneous languages (Latin-3) ISO 8859-4 Scandinavian/Baltic languages (Latin-4) ISO 8859-5 Latin/Cyrillic ISO 8859-6 Latin/Arabic ISO 8859-7 Latin/Greek ISO 8859-8 Latin/Hebrew ISO 8859-9 Latin-1 modification for Turkish (Latin-5) ISO 8859-10 Lappish/Nordic/Eskimo languages (Latin-6) ISO 8859-11 Latin/Thai ISO 8859-13 Baltic Rim languages (Latin-7) ISO 8859-14 Celtic (Latin-8) ISO 8859-15 West European languages (Latin-9) ISO 8859-16 Romanian (Latin-10) ISO 8859-14 characters The following table displays the characters in ISO 8859-14, which are printable and unlisted in the ascii(7) manual page. The fourth col- umn will only show the proper glyphs in an environment configured for ISO 8859-14. Oct Dec Hex Char Description ---------------------------------------------------------------- 240 160 A0 NO-BREAK SPACE 241 161 A1 i LATIN CAPITAL LETTER B WITH DOT ABOVE 242 162 A2 c LATIN SMALL LETTER B WITH DOT ABOVE 243 163 A3 L POUND SIGN 244 164 A4 EUR LATIN CAPITAL LETTER C WITH DOT ABOVE 245 165 A5 Y LATIN SMALL LETTER C WITH DOT ABOVE 246 166 A6 LATIN CAPITAL LETTER D WITH DOT ABOVE 247 167 A7 S SECTION SIGN 250 168 A8 LATIN CAPITAL LETTER W WITH GRAVE 251 169 A9 (C) COPYRIGHT SIGN 252 170 AA a LATIN CAPITAL LETTER W WITH ACUTE 253 171 AB << LATIN SMALL LETTER D WITH DOT ABOVE 254 172 AC ~ LATIN CAPITAL LETTER Y WITH GRAVE 255 173 AD SOFT HYPHEN 256 174 AE (_) REGISTERED SIGN 257 175 AF LATIN CAPITAL LETTER Y WITH DIAERESIS 260 176 B0 o LATIN CAPITAL LETTER F WITH DOT ABOVE 261 177 B1 +- LATIN SMALL LETTER F WITH DOT ABOVE 262 178 B2 2 LATIN CAPITAL LETTER G WITH DOT ABOVE 263 179 B3 3 LATIN SMALL LETTER G WITH DOT ABOVE 264 180 B4 LATIN CAPITAL LETTER M WITH DOT ABOVE 265 181 B5 u LATIN SMALL LETTER M WITH DOT ABOVE 266 182 B6 9| PILCROW SIGN 267 183 B7 . LATIN CAPITAL LETTER P WITH DOT ABOVE 270 184 B8 LATIN SMALL LETTER W WITH GRAVE 271 185 B9 1 LATIN SMALL LETTER P WITH DOT ABOVE 272 186 BA o LATIN SMALL LETTER W WITH ACUTE 273 187 BB >> LATIN CAPITAL LETTER S WITH DOT ABOVE 274 188 BC OE LATIN SMALL LETTER Y WITH GRAVE 275 189 BD oe LATIN CAPITAL LETTER W WITH DIAERESIS 276 190 BE LATIN SMALL LETTER W WITH DIAERESIS 277 191 BF c LATIN SMALL LETTER S WITH DOT ABOVE 300 192 C0 A LATIN CAPITAL LETTER A WITH GRAVE 301 193 C1 A LATIN CAPITAL LETTER A WITH ACUTE 302 194 C2 A LATIN CAPITAL LETTER A WITH CIRCUMFLEX 303 195 C3 A LATIN CAPITAL LETTER A WITH TILDE 304 196 C4 A LATIN CAPITAL LETTER A WITH DIAERESIS 305 197 C5 A LATIN CAPITAL LETTER A WITH RING ABOVE 306 198 C6 AE LATIN CAPITAL LETTER AE 307 199 C7 C LATIN CAPITAL LETTER C WITH CEDILLA 310 200 C8 E LATIN CAPITAL LETTER E WITH GRAVE 311 201 C9 E LATIN CAPITAL LETTER E WITH ACUTE 312 202 CA E LATIN CAPITAL LETTER E WITH CIRCUMFLEX 313 203 CB E LATIN CAPITAL LETTER E WITH DIAERESIS 314 204 CC I LATIN CAPITAL LETTER I WITH GRAVE 315 205 CD I LATIN CAPITAL LETTER I WITH ACUTE 316 206 CE I LATIN CAPITAL LETTER I WITH CIRCUMFLEX 317 207 CF I LATIN CAPITAL LETTER I WITH DIAERESIS 320 208 D0 D LATIN CAPITAL LETTER W WITH CIRCUMFLEX 321 209 D1 N LATIN CAPITAL LETTER N WITH TILDE 322 210 D2 O LATIN CAPITAL LETTER O WITH GRAVE 323 211 D3 O LATIN CAPITAL LETTER O WITH ACUTE 324 212 D4 O LATIN CAPITAL LETTER O WITH CIRCUMFLEX 325 213 D5 O LATIN CAPITAL LETTER O WITH TILDE 326 214 D6 O LATIN CAPITAL LETTER O WITH DIAERESIS 327 215 D7 x LATIN CAPITAL LETTER T WITH DOT ABOVE 330 216 D8 O LATIN CAPITAL LETTER O WITH STROKE 331 217 D9 U LATIN CAPITAL LETTER U WITH GRAVE 332 218 DA U LATIN CAPITAL LETTER U WITH ACUTE 333 219 DB U LATIN CAPITAL LETTER U WITH CIRCUMFLEX 334 220 DC U LATIN CAPITAL LETTER U WITH DIAERESIS 335 221 DD Y LATIN CAPITAL LETTER Y WITH ACUTE 336 222 DE b LATIN CAPITAL LETTER Y WITH CIRCUMFLEX 337 223 DF B LATIN SMALL LETTER SHARP S 340 224 E0 a LATIN SMALL LETTER A WITH GRAVE 341 225 E1 a LATIN SMALL LETTER A WITH ACUTE 342 226 E2 a LATIN SMALL LETTER A WITH CIRCUMFLEX 343 227 E3 a LATIN SMALL LETTER A WITH TILDE 344 228 E4 a LATIN SMALL LETTER A WITH DIAERESIS 345 229 E5 a LATIN SMALL LETTER A WITH RING ABOVE 346 230 E6 ae LATIN SMALL LETTER AE 347 231 E7 c LATIN SMALL LETTER C WITH CEDILLA 350 232 E8 e LATIN SMALL LETTER E WITH GRAVE 351 233 E9 e LATIN SMALL LETTER E WITH ACUTE 352 234 EA e LATIN SMALL LETTER E WITH CIRCUMFLEX 353 235 EB e LATIN SMALL LETTER E WITH DIAERESIS 354 236 EC i LATIN SMALL LETTER I WITH GRAVE 355 237 ED i LATIN SMALL LETTER I WITH ACUTE 356 238 EE i LATIN SMALL LETTER I WITH CIRCUMFLEX 357 239 EF i LATIN SMALL LETTER I WITH DIAERESIS 360 240 F0 o LATIN SMALL LETTER W WITH CIRCUMFLEX 361 241 F1 n LATIN SMALL LETTER N WITH TILDE 362 242 F2 o LATIN SMALL LETTER O WITH GRAVE 363 243 F3 o LATIN SMALL LETTER O WITH ACUTE 364 244 F4 o LATIN SMALL LETTER O WITH CIRCUMFLEX 365 245 F5 o LATIN SMALL LETTER O WITH TILDE 366 246 F6 o LATIN SMALL LETTER O WITH DIAERESIS 367 247 F7 -:- LATIN SMALL LETTER T WITH DOT ABOVE 370 248 F8 o LATIN SMALL LETTER O WITH STROKE 371 249 F9 u LATIN SMALL LETTER U WITH GRAVE 372 250 FA u LATIN SMALL LETTER U WITH ACUTE 373 251 FB u LATIN SMALL LETTER U WITH CIRCUMFLEX 374 252 FC u LATIN SMALL LETTER U WITH DIAERESIS 375 253 FD y LATIN SMALL LETTER Y WITH ACUTE 376 254 FE b LATIN SMALL LETTER Y WITH CIRCUMFLEX 377 255 FF y LATIN SMALL LETTER Y WITH DIAERESIS NOTES
ISO 8859-14 is also known as Latin-8. SEE ALSO
ascii(7) COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2010-09-20 ISO_8859-14(7)
All times are GMT -4. The time now is 11:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy