Sponsored Content
Top Forums Shell Programming and Scripting Break a file into smaller pieces with same search string Post 303023873 by nadeemrafikhan on Tuesday 25th of September 2018 05:43:18 AM
Old 09-25-2018
below is the Input file

Code:
<BEAM-PATTERN-LIST>
<bean pattern>
<M>0.0,0.00</M>
<M>1.0,0.00</M>
<M>2.0,0.00</M>
<M>3.0,0.00</M>
<M>4.0,0.00</M>
<M>5.0,0.10</M>
<M>6.0,0.10</M>
<M>7.0,0.10</M>
<M>8.0,0.20</M>
<M>9.0,0.20</M>
</bean pattern>
<bean pattern>
<M>170.0,26.50</M>
<M>171.0,26.40</M>
<M>172.0,26.30</M>
<M>173.0,26.30</M>
<M>174.0,26.20</M>
<M>175.0,26.10</M>
<M>176.0,26.10</M>
<M>177.0,26.10</M>
<M>178.0,26.00</M>
<M>179.0,26.00</M>
</bean pattern>
<bean pattern>
<M>190.0,26.00</M>
<M>191.0,26.10</M>
<M>192.0,26.10</M>
<M>193.0,26.10</M>
<M>194.0,26.20</M>
<M>195.0,26.30</M>
<M>196.0,26.30</M>
<M>197.0,26.40</M>
<M>198.0,26.50</M>
<M>199.0,26.50</M>
</bean pattern>
---------------
---------------
------so on-----------
-----------------
</BEAM-PATTERN-LIST>

out put files
first file:
Code:
<M>0.0,0.00</M>
<M>1.0,0.00</M>
<M>2.0,0.00</M>
<M>3.0,0.00</M>
<M>4.0,0.00</M>
<M>5.0,0.10</M>
<M>6.0,0.10</M>
<M>7.0,0.10</M>
<M>8.0,0.20</M>
<M>9.0,0.20</M>

second output file
Code:
<M>170.0,26.50</M>
<M>171.0,26.40</M>
<M>172.0,26.30</M>
<M>173.0,26.30</M>
<M>174.0,26.20</M>
<M>175.0,26.10</M>
<M>176.0,26.10</M>
<M>177.0,26.10</M>
<M>178.0,26.00</M>
<M>179.0,26.00</M>

third out file
Code:
<M>190.0,26.00</M>
<M>191.0,26.10</M>
<M>192.0,26.10</M>
<M>193.0,26.10</M>
<M>194.0,26.20</M>
<M>195.0,26.30</M>
<M>196.0,26.30</M>
<M>197.0,26.40</M>
<M>198.0,26.50</M>
<M>199.0,26.50</M>

---------------
-------nth output file-----------
------------------

hope i make clear this one
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to insert line break + string in vi (search & replace )

Hello all i have big test file that has allot of structure text something like this : <foo1 *.html> <blah action> somthing 1 somthing 2 </blah> </foo1 > now i will like to insert 2 more lines of text below the <blah action> so it will be like : <foo1... (1 Reply)
Discussion started by: umen
1 Replies

2. Shell Programming and Scripting

appending string to text file based on search string

Hi, I need to append string "Hi" to the beginning of the lines containing some specific string. How can I achieve that? Please help. Malay (1 Reply)
Discussion started by: malaymaru
1 Replies

3. Shell Programming and Scripting

search string in a file and retrieve 10 lines including string line

Hi Guys, I am trying to write a perl script to search a string "Name" in the file "FILE" and also want to create a new file and push the searched string Name line along with 10 lines following the same. can anyone of you please let me know how to go about it ? (8 Replies)
Discussion started by: sukrish
8 Replies

4. UNIX for Dummies Questions & Answers

add a string to a file without line break

I searched and found "echo -n" and "printf" are solution for this, but they are not here: $ echo "hello" >> test $ cat test hello $ echo -n "world" >> test $ cat test hello world $ echo -n " seriously?" >> test $ cat test hello world seriously? This is not successful... (15 Replies)
Discussion started by: stunn3r
15 Replies

5. Shell Programming and Scripting

Search a string in a text file and add another string at the particular position of a line

I am having a text file which is having more than 200 lines. EX: 001010122 12000 BIB 12000 11200 1200003 001010122 2000 AND 12000 11200 1200003 001010122 12000 KVB 12000 11200 1200003 In the above file i want to search for string KVB and add/replace... (1 Reply)
Discussion started by: suryanarayana
1 Replies

6. Shell Programming and Scripting

Search a string in a text file and add another string at the end of line

Dear All I am having a text file which is having more than 200 lines. EX: 001010122 12000 BIB 12000 11200 1200003 001010122 2000 AND 12000 11200 1200003 001010122 12000 KVB 12000 11200 1200003 In the above file i want to search for string KVB... (5 Replies)
Discussion started by: suryanarayana
5 Replies

7. Shell Programming and Scripting

Search string within a file and list common words from the line having the search string

Hi, Need your help for this scripting issue I have. I am not really good at this, so seeking your help. I have a file looking similar to this: Hello, i am human and name=ABCD. How are you? Hello, i am human and name=PQRS. I am good. Hello, i am human and name=ABCD. Good bye. Hello, i... (12 Replies)
Discussion started by: royzlife
12 Replies

8. UNIX for Dummies Questions & Answers

Search for a string,delete the line and replace with new string in a file

Hi Everyone, I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file. I am very new to unix. Kindly help... (10 Replies)
Discussion started by: Pradhikshan
10 Replies

9. UNIX for Beginners Questions & Answers

Search a string and display its location on the entire string and make a text file

I want to search a small string in a large string and find the locations of the string. For this I used grep "string" -ob <file name where the large string is stored>. Now this gives me the locations of that string. Now how do I store these locations in a text file. Please use CODE tags as... (7 Replies)
Discussion started by: ANKIT ROY
7 Replies

10. UNIX for Beginners Questions & Answers

Search partial string in a file and replace the string - UNIX

I have the below string which i need to compare with a file and replace this string in the file which matches closely. Can anyone help me on this. string(Scenario 1)- user::r--,user::ourfrd:r-- String(Scenario 2)- user::r-- File **** # file: /local/Desktop/myfile # owner: me # group:... (6 Replies)
Discussion started by: sarathy_a35
6 Replies
ARMSCII-8(7)						     Linux Programmer's Manual						      ARMSCII-8(7)

NAME
armscii-8 - Armenian character set encoded in octal, decimal, and hexadecimal DESCRIPTION
The Armenian Standard Code for Information Interchange, 8-bit coded character set. ArmSCII-8 characters The following table displays the characters in ArmSCII-8, which are printable and unlisted in the ascii(7) manual page. The fourth column will only show the proper glyphs in an environment configured for ArmSCII-8. Oct Dec Hex Char Description -------------------------------------------------------------------- 240 160 A0 NO-BREAK SPACE 242 162 A2 ARMENIAN SMALL LIGATURE ECH YIWN 243 163 A3 ARMENIAN FULL STOP 244 164 A4 ) RIGHT PARENTHESIS 245 165 A5 ( LEFT PARENTHESIS 246 166 A6 >> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK 247 167 A7 << LEFT-POINTING DOUBLE ANGLE QUOTATION MARK 250 168 A8 -- EM DASH 251 169 A9 . FULL STOP 252 170 AA ARMENIAN COMMA 253 171 AB , COMMA 254 172 AC - HYPHEN-MINUS 255 173 AD ARMENIAN HYPHEN 256 174 AE HORIZONTAL ELLIPSIS 257 175 AF ARMENIAN EXCLAMATION MARK 260 176 B0 ARMENIAN EMPHASIS MARK 261 177 B1 ARMENIAN QUESTION MARK 262 178 B2 ARMENIAN CAPITAL LETTER AYB 263 179 B3 ARMENIAN SMALL LETTER AYB 264 180 B4 ARMENIAN CAPITAL LETTER BEN 265 181 B5 ARMENIAN SMALL LETTER BEN 266 182 B6 ARMENIAN CAPITAL LETTER GIM 267 183 B7 ARMENIAN SMALL LETTER GIM 270 184 B8 ARMENIAN CAPITAL LETTER DA 271 185 B9 ARMENIAN SMALL LETTER DA 272 186 BA ARMENIAN CAPITAL LETTER ECH 273 187 BB ARMENIAN SMALL LETTER ECH 274 188 BC ARMENIAN CAPITAL LETTER ZA 275 189 BD ARMENIAN SMALL LETTER ZA 276 190 BE ARMENIAN CAPITAL LETTER EH 277 191 BF ARMENIAN SMALL LETTER EH 300 192 C0 ARMENIAN CAPITAL LETTER ET 301 193 C1 ARMENIAN SMALL LETTER ET 302 194 C2 ARMENIAN CAPITAL LETTER TO 303 195 C3 ARMENIAN SMALL LETTER TO 304 196 C4 ARMENIAN CAPITAL LETTER ZHE 305 197 C5 ARMENIAN SMALL LETTER ZHE 306 198 C6 ARMENIAN CAPITAL LETTER INI 307 199 C7 ARMENIAN SMALL LETTER INI 310 200 C8 ARMENIAN CAPITAL LETTER LIWN 311 201 C9 ARMENIAN SMALL LETTER LIWN 312 202 CA ARMENIAN CAPITAL LETTER XEH 313 203 CB ARMENIAN SMALL LETTER XEH 314 204 CC ARMENIAN CAPITAL LETTER CA 315 205 CD ARMENIAN SMALL LETTER CA 316 206 CE ARMENIAN CAPITAL LETTER KEN 317 207 CF ARMENIAN SMALL LETTER KEN 320 208 D0 ARMENIAN CAPITAL LETTER HO 321 209 D1 ARMENIAN SMALL LETTER HO 322 210 D2 ARMENIAN CAPITAL LETTER JA 323 211 D3 ARMENIAN SMALL LETTER JA 324 212 D4 ARMENIAN CAPITAL LETTER GHAD 325 213 D5 ARMENIAN SMALL LETTER GHAD 326 214 D6 ARMENIAN CAPITAL LETTER CHEH 327 215 D7 ARMENIAN SMALL LETTER CHEH 330 216 D8 ARMENIAN CAPITAL LETTER MEN 331 217 D9 ARMENIAN SMALL LETTER MEN 332 218 DA ARMENIAN CAPITAL LETTER YI 333 219 DB ARMENIAN SMALL LETTER YI 334 220 DC ARMENIAN CAPITAL LETTER NOW 335 221 DD ARMENIAN SMALL LETTER NOW 336 222 DE ARMENIAN CAPITAL LETTER SHA 337 223 DF ARMENIAN SMALL LETTER SHA 340 224 E0 ARMENIAN CAPITAL LETTER VO 341 225 E1 ARMENIAN SMALL LETTER VO 342 226 E2 ARMENIAN CAPITAL LETTER CHA 343 227 E3 ARMENIAN SMALL LETTER CHA 344 228 E4 ARMENIAN CAPITAL LETTER PEH 345 229 E5 ARMENIAN SMALL LETTER PEH 346 230 E6 ARMENIAN CAPITAL LETTER JHEH 347 231 E7 ARMENIAN SMALL LETTER JHEH 350 232 E8 ARMENIAN CAPITAL LETTER RA 351 233 E9 ARMENIAN SMALL LETTER RA 352 234 EA ARMENIAN CAPITAL LETTER SEH 353 235 EB ARMENIAN SMALL LETTER SEH 354 236 EC ARMENIAN CAPITAL LETTER VEW 355 237 ED ARMENIAN SMALL LETTER VEW 356 238 EE ARMENIAN CAPITAL LETTER TIWN 357 239 EF ARMENIAN SMALL LETTER TIWN 360 240 F0 ARMENIAN CAPITAL LETTER REH 361 241 F1 ARMENIAN SMALL LETTER REH 362 242 F2 ARMENIAN CAPITAL LETTER CO 363 243 F3 ARMENIAN SMALL LETTER CO 364 244 F4 ARMENIAN CAPITAL LETTER YIWN 365 245 F5 ARMENIAN SMALL LETTER YIWN 366 246 F6 ARMENIAN CAPITAL LETTER PIWR 367 247 F7 ARMENIAN SMALL LETTER PIWR 370 248 F8 ARMENIAN CAPITAL LETTER KEH 371 249 F9 ARMENIAN SMALL LETTER KEH 372 250 FA ARMENIAN CAPITAL LETTER OH 373 251 FB ARMENIAN SMALL LETTER OH 374 252 FC ARMENIAN CAPITAL LETTER FEH 375 253 FD ARMENIAN SMALL LETTER FEH 376 254 FE ARMENIAN APOSTROPHE 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 ARMSCII-8(7)
All times are GMT -4. The time now is 01:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy