Search Results

Search: Posts Made By: sol_nov
4,481
Posted By sol_nov
[Solved] Multi line regex for search and replace
I have text file like below:

a.txt

Server=abc
Run=1
Time=120.123
Tables=10
Sessions=16
Time=380.123
Version=1.1
Jobs=5

Server=abc
Run=2
Time=160.123
Tables=15
Sessions=16...
2,180
Posted By sol_nov
Yes, only those variables in the report="...
Yes, only those variables in the
report=" Server Run Tables Time "
2,180
Posted By sol_nov
thanks, but it is skipping the first instance,...
thanks, but it is skipping the first instance, and I would like only the one from the list
report=" Server Run Tables Time "


Jobs 5 5
Run 2 3
Server abc abc
Sessions 16 16
Tables 15 20
2,180
Posted By sol_nov
Convert single column into multiple rows
Convert Single column to multiple rows
file a.txt contains data like below

Server=abc
Run=1
Tables=10
Sessions=16
Time=380
Jobs=5
Server=abc
Run=2
Tables=15
Sessions=16
Time=400
Jobs=5...
1,904
Posted By sol_nov
Print only matched pattern in perl
Hi,

I have script like below:


#!/usr/local/bin/perl

use strict;
use warnings;

while (<DATA>) {

( my ($s_id) = /^\d+\|(\d+?)\|/ ) ;

if ( $s_id == 1 ){

...
1,205
Posted By sol_nov
Perl regexp help
Hi,

I have file like below:

1|1212|34353|5fdf 6575||dfgdg sfsdf |afsf||4|aasfbc|~1213~~~~~
1|1212|34353|5fdf 6575||dfgdg sfsdf |affsf| |4|abc|~rwarw~~asa~~~123~312313
1|1212|34353|5fdf...
2,164
Posted By sol_nov
But it is failing for row size around 10k bytes.
But it is failing for row size around 10k bytes.
2,164
Posted By sol_nov
Split the file based on pattern
Hi ,

I have huge files around 400 mb, which has clob data and have diffeent scenarios:

I am trying to pass scenario number as parameter and and get required modified file based on the scenario...
4,298
Posted By sol_nov
Thanks, But I have the record size around 64000...
Thanks, But I have the record size around 64000 bytes, so it is failing with too long.

Can this be done using perl?
4,298
Posted By sol_nov
Split the file based on column
Hi,

I have a file sample_1.txt (300k rows) which has data like below:

* Also each record is around 64k bytes


11|1|abc|102553|125589|64k bytes of data
10|2|def|123452|123356|.........
2,368
Posted By sol_nov
sed print between 2 patterns only last occurence
Hi,

I have a file, which contains the following log data.

I am trying to print fromt he file the following data:

I have tried using sed, but I am getting from the first pattern

Thanks for...
19,787
Posted By sol_nov
Sorry for the typo: I am trying to match the...
Sorry for the typo:

I am trying to match the pattern


hello and bye are not same always, there can be anything in place hello and bye.

I am trying to remember the value and repalce it like...
1,280
Posted By sol_nov
You have to use double quotes instead
You have to use double quotes instead
19,787
Posted By sol_nov
Sed replace using same pattern repeating multiple times in a line
Sed replace using same pattern repeating multiple times in a line

I have text like below in a file:

I am trying to replace the above line to following
How can I acheive this?

I am able to...
2,060
Posted By sol_nov
Thanks, Got it working...
Thanks, Got it working...
2,060
Posted By sol_nov
I tried using the -F"|", but it doesn't seem to...
I tried using the -F"|", but it doesn't seem to work.

I have tried the while IFS but it is not exiting the loop.
2,078
Posted By sol_nov
Similarly how can we select only the last line?
Similarly how can we select only the last line?
2,060
Posted By sol_nov
[SOLVED] nawk FS using pipe read variables from file
I have a file data_1.out which contains:


1|abc mail|mail subject|mail body
2|def mail|mail subject|def mail body


I am trying to read the variables from data_1.out and use them to print to...
2,078
Posted By sol_nov
Perl inline replace only on 1st line
I have file file_1.out which contains the data below

<tr> MAIL # 1 TO src_1 </tr>
<tr><td class="hcol">col_id</td> <td class="hcol">test_dt</td> <td class="hcol">user_type</td> <td...
1,529
Posted By sol_nov
replace using pattern using awk or sed
I have file file_1.txt which contains:
file_1.txt

<tr> 1 MAIL # 1 TO src_1 </tr>
<tr><td class="hcol">col_id</td> <td class="hcol">test_dt</td> <td class="hcol">user_type</td> <td...
1,644
Posted By sol_nov
Compare two files and print using awk
I have 2 files:

email_1.out
1 abc@yahoo.com
2 abc_1@yahoo.com
3 abc_2@yahoo.com

data_1.out
<tr> 1 MAIL # 1 TO src_1 </tr>
<tr><td class="hcol">col_id</td> <td...
2,312
Posted By sol_nov
sum using awk with pattern match
I have a file which has data like this

*** Query completed. One row found.
*** Query completed. One row found.
*** Query completed. One row found.
*** Insert completed. 5 rows added.
...
2,369
Posted By sol_nov
Thanks, But I am getting the output as follows ...
Thanks, But I am getting the output as follows

<tr><td class=></td><td class=cB>Hello</td><td class=cB>1245</td><td class=cB>958</td><td class=cB>1.34</td><td class=cB>1.36</td><td...
2,369
Posted By sol_nov
Suppose I have a file like this: Hello 1245...
Suppose I have a file like this:
Hello 1245 958 1.34 1.36

How can I wrap tags around them like below:
<tr><td class="cB">Hello</td><td class="cB">1245</td><td class="cB">958</td><td...
2,369
Posted By sol_nov
SunOS
SunOS
Showing results 1 to 25 of 59

 
All times are GMT -4. The time now is 07:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy