Search Results

Search: Posts Made By: james2009
7,846
Posted By james2009
Thanks Robin, but i'm looking at a situation...
Thanks Robin, but i'm looking at a situation where the 8-digit number can appear in another position in the string. In that case it will not always be the 9th element of the array.

---------- Post...
7,846
Posted By james2009
Extract n-digits from string in perl
Hello,

I have a log file with logs such as

01/05/2017 10:23:41 [ABCD-22357$0]: file.log.38: database error, MODE=SINGLE, LEVEL=critical, STATE: 01170255 (mode main


how can i use perl to...
1,749
Posted By james2009
Hi Ravinder, the script is ok. Can you explain...
Hi Ravinder, the script is ok. Can you explain the logic pls.
1,749
Posted By james2009
Print next line beside preceding line on column match
Hi,

I have some data like below:

John 254
Chris 254
Matt 123
Abe 123
Raj 487
Moh 487

How can i print it using awk to have:

254 John,Chris
123 Matt,Abe
487 Raj,Moh
...
4,189
Posted By james2009
Thanks drl. It worked.
Thanks drl. It worked.
4,189
Posted By james2009
Hi ravinder, Thanks but it didn't work.
Hi ravinder,

Thanks but it didn't work.
4,189
Posted By james2009
How to filter out consecutive occurence of digits from file?
Hello,

I have a text file containing the following for example:

This number 123456 is in line number one.
Line number two contains -333444 number.
The third line has a 111111 in between and...
1,805
Posted By james2009
Rename files based on name in text file
Hello, I have a text file "file.list" with the contents below.


file1
filename1
file2
filename2
file3
filename3


file1, file2 and file3 are files existing in the same directory as the...
1,262
Posted By james2009
Thanks Corona688, can you explain the script.
Thanks Corona688, can you explain the script.
1,262
Posted By james2009
How to separate rows of data into another column?
I have data such as below where the value in second field is the same as that in the row after.

123456,22222,John,0,xyz
234567,22222,John1,1,cde
43212,3333,Jean,3,pip
84324,3333,Abel,2,cat
...
1,215
Posted By james2009
Thanks all for the suggestions. @RudiC, your...
Thanks all for the suggestions.

@RudiC, your awk script gave me the best output when run against a whole lot of data. Pls can you explain the logic.

@Akshay: Your script also gave a good output...
1,215
Posted By james2009
Formatting of output
Hi,

I have some output in the format below:
Col-A Col-B
8781 4319
8781 2332
8781 0269
5550 3282
5550 9465
5550 7607
7064 4456
.
.

I want to re-format the output...
4,703
Posted By james2009
Thanks devtakh, it works but could that be done...
Thanks devtakh, it works but could that be done in a one-liner using multidimensional arrays?
4,703
Posted By james2009
Hello devtakh, The script is not working
Hello devtakh,

The script is not working
4,703
Posted By james2009
Thanks for your solutions. I have updated the...
Thanks for your solutions. I have updated the initial question. Any solutions?
4,703
Posted By james2009
panyam, Your script only removes the double...
panyam,

Your script only removes the double quotes and does not format it correctly. I need the output to be like this

Name,Age,Study,Code
Fred,24,English,0
Bob,30,Engineering,0...
4,703
Posted By james2009
arrays in awk
Hi,

I have the following data in a file for example:

Name="Fred","Bob","Peterson","Susan","Weseley"
Age="24","30","28","23","45"
Study="English","Engineering","Physics","Maths","Psychology"...
Showing results 1 to 17 of 17

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