Search Results

Search: Posts Made By: i150371485
1,111
Posted By i150371485
Try This : awk...
Try This :


awk 'FNR==NR{for(i=1;i<=NF;i++) e[FNR,i]=$i;next}
{for(i=1;i<=NF;i++)

printf("%s%s",e[FNR,i]+e[FNR,i]*$i,i==NF?"\n":" ")
}' A B
1,567
Posted By i150371485
@Scrutinizer : Thank you so much .. I got clear...
@Scrutinizer : Thank you so much .. I got clear idea why we use NR=FNR. Thanks once again .
1,567
Posted By i150371485
@Scrutinizer :Could you please explain command...
@Scrutinizer :Could you please explain command used using the AWK associate arrays here . I am new bie to awk arrays.Plz help
1,382
Posted By i150371485
@durden_tyler : Thanks for the information :) it...
@durden_tyler : Thanks for the information :) it helps me and will try to modify the reg ex with respect to my requirements .. thanks again :)
2,621
Posted By i150371485
Hope the below link helps you ...
Hope the below link helps you

https://www.unix.com/solaris/33533-grep-display-few-lines-before-after.html
1,382
Posted By i150371485
Thanks for the reply scrutinizer . Yes sorry...
Thanks for the reply scrutinizer . Yes sorry please find the exact data below


000800 15 test1 PIC X
000800 15 test1 PIC XX
000800 15 test1 PIC XXX
000800 15 test1 PIC X(8)
000800 15 test1...
1,382
Posted By i150371485
PERL: retrieve the data based on regular expression
Hi Friends

i have a code below

sample $text contains the values


test1 PIC X
test1 PIC XX
test1 PIC XXX
test1 PIC X(8)
test1 PIC X(12)
test1 PIC X
test1 X(8)
test1 PIC X VALUE...
1,072
Posted By i150371485
if the files are in sorted order please use comm...
if the files are in sorted order please use comm and diff commands . please go through the man page for more details.
2,524
Posted By i150371485
@zazzybob : Thanks for the info :)
@zazzybob : Thanks for the info :)
2,524
Posted By i150371485
Covert textfile to pdf format in ksh UNIX
Dear Friends,

Is there anyway we can convert the textfile to pdf file. I have used mv a.txt a.pdf command but dont able open the file in pdf.

Plz advice .
1,064
Posted By i150371485
@itkamaraj , @ bala.. Thank you so much . It...
@itkamaraj , @ bala.. Thank you so much . It works as expected. :)
1,064
Posted By i150371485
Renaming a filename
Hi friends ,

i want to change the filename as below


filename=ABC_HYND_JDHD_20130125120345.txt


expected output : ABC_HYND_JDHD_20130125.txt


i have tried using awk but not able...
2,305
Posted By i150371485
@Scrutinizer : Thank you so much for the reply....
@Scrutinizer : Thank you so much for the reply. would you mind explaining the code please?
2,305
Posted By i150371485
@Scrutinizer : Thanks for the reply. so far i...
@Scrutinizer : Thanks for the reply. so far i have joined the file1.txt and file2.txt by using the first column in 2 files.


join -t"|" -11 -21 file1.txt file2.txt
1|ABC|3|jul|dhj||3|KING|dhj...
2,305
Posted By i150371485
Merge files based on the column value
Hi Friends,

I have a file


file1.txt

1|ABC|3|jul|dhj
2|NHU|4|kil|eu
3|hjd|34|hfd|43



file2.txt

1||3|KING|dhj
2|NHU||k|
3|hjd|34|hd|43

i want to merge file1.txt...
1,559
Posted By i150371485
Generate files from one file based on lines
Hi Friends,

I have a file1

file1.txt


1ABC 13478 aqjerh 473 343
2hej 478 5775 24578 23892
3fhd fg 847 brjkb f99345 487
4eh ehjk 84 47589 8947 234
5784 487 738 52895 8975
6 57489...
4,060
Posted By i150371485
@bakunin : Thanks for the reply . Please find the...
@bakunin : Thanks for the reply . Please find the below the code i have used. I have content.txt file where it contains more than 500 characters. i will be using the pre.txt where the data is...
4,060
Posted By i150371485
AWK error - string cannot be longer than X bytes
Hi Friends,

Could you please tell me why i am getting the below eror while working with awk. I am confused :confused: what to do ?


awk: 0602-591 String 1,9,20,6,6 cannot be longer than 399...
1,291
Posted By i150371485
@Itkamaraj: Thanks for the reply. Thank you so...
@Itkamaraj: Thanks for the reply. Thank you so much.. it works as expected Could you exaplain the code ?
1,291
Posted By i150371485
Combining lines in to one line
Hi Friends,

I have a file1.txt

1001 jkilo yrhfm
200056 jhdf rjhwjkrh
3+u8jk5h3 uru ehjk
1002 jkfhk hfjkd
2748395 fdjksfh hefjkh
3hdfk ejkh kjhjke

In the above if you see the firt...
2,131
Posted By i150371485
@Scrutinizer : Thank you so much :)
@Scrutinizer : Thank you so much :)
2,131
Posted By i150371485
@Scrutinizer : Thanks for the reply. it works as...
@Scrutinizer : Thanks for the reply. it works as expected. Thank you :) . Would you mind explaning the command ?
2,131
Posted By i150371485
@Pamu Thanks for the quick response . Again in...
@Pamu Thanks for the quick response . Again in the 5th field the dot is removing. I actually dont want to remove the "dots"(.) from text fields . I should only remove the "." from the Number fields ....
2,131
Posted By i150371485
perl - Removing dots(".") from the data
Hi Friends,


I have a file1 as below

file1.txt


100000.||1925-01-10|00:00|1862SHERMA NAVE#1SE.||EVTON|IL|60201||22509.|BDSS|62007|2639.|26670
100001.||1935-01-10|00:00|1862NEW . YRK...
1,682
Posted By i150371485
@danielos : Thanks for the reply. . I have tried...
@danielos : Thanks for the reply. . I have tried the above code and will change accroding to my requirement.it would be great if you Could explain the code ?
Showing results 1 to 25 of 99

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