Search Results

Search: Posts Made By: ks_reddy
2,890
Posted By ks_reddy
Getting Syntax error.
Hi Don,
Thanks for your code.
When I try to run like this awk -f script.awk input1.csv input2.csv I am getting the below error.
awk ' BEGIN { FS =OFS=","
^ invalid char ''' in expression
...
2,890
Posted By ks_reddy
Hi Don, Thanks for going through my request. I...
Hi Don,
Thanks for going through my request. I am very sorry in my late reply.
What I provided earlier is a simple case.
Here is the desired output for my previous query.
A,B,C,D
1,2,,
,,4,5....
2,890
Posted By ks_reddy
Row bind multiple csv files having different column headers
All,
I guess by this time someone asked this kind of question, but sorry I am unable to find after a deep search.
Here is my request
I have many files out of which 2 sample files provided below....
1,245
Posted By ks_reddy
Thank you so much Yoda.
Your script worked very well.
Thank you so much !!

Sidda
1,245
Posted By ks_reddy
Script to rename the repeating strings
All,
I have a sample text like below.
Key (Header)
Key1
ABC
Key2
ABC
Key3
ABC
ABC
Key4
ABC
Key5
ABC
ABC
ABC

Required Output
Key (Header)
Key1
1,272
Posted By ks_reddy
Thanks RudiC and Aia for your prompt replies.
Thanks RudiC and Aia for your prompt replies.
1,272
Posted By ks_reddy
Append a specific keyword in a text file into a new column
All,

I have some sample text file(.csv) in the below format. In my actual file there are at least 100K rows.
date 03/25/2016
A,B,C
D,E,F
date 03/26/2016
1,2,3
4,5,6
date 03/27/2016
6,4,3...
3,931
Posted By ks_reddy
Hi rdrtx1, Your code works very well. Thank...
Hi rdrtx1,
Your code works very well. Thank you so much.

---------- Post updated at 05:27 AM ---------- Previous update was at 05:26 AM ----------

Hello Don,
As mentioned already the code...
3,931
Posted By ks_reddy
awk to ignore multiple rows based on a condition
All,
I have a text file(Inputfile.csv) with millions of rows and 100 columns. Check the sample for 2 columns below.
Key,Check
A,1
A,2
A,
A,4
B,0
B,1
B,2
B,3
B,4
....
million rows.
...
977
Posted By ks_reddy
Extract all text between the same matching string from a given column
Hello All,
I have an input sample data like below (In actual I have many columns and few million rows).
Column1,Column2
4,2
1,5
Hello,4
1,4
Hello,2
3,5
Hello,8
4,5

Need the output (using...
1,375
Posted By ks_reddy
Thanks
Thanks RudiC.
Your script is almost okay.
Here is what my final script.
awk '
BEGIN {FS = OFS = "," }
$1 != last { last = $1; x = int((1 + c++) / 2) }
$2 = x OFS $2
' Input.csv...
1,375
Posted By ks_reddy
Thanks..
Thanks Don.
Your script works very well, but it won't print the remaining columns it is. I am trying to modify that. Will be great if you have a smarter solution to print $0 as it is in addition to...
1,375
Posted By ks_reddy
Find the modified and clear output
Hi Don,
Here is my clear requirement.
Column-1 is my given data with unique strings where each string appearing more than once but in the order.
For example 'A' appears only in 3 rows but no...
1,375
Posted By ks_reddy
Script to code every 2 consecutive entries as single entry
All,

I come across the below requirement and my search on the previous posts did not result into any matches.
I have one column of data from a csv file like below. And I need to add additional...
2,209
Posted By ks_reddy
Indexing each repeating pattern of rows in a column using awk/sed
Hello All,

I have data like this in a column.

0
1
2
3
0
3
4
5
6
0
1
2
3
etc. where 0 identifies the start of a pattern in my data.
So I need the output like below using either...
1,332
Posted By ks_reddy
Find the attachment which has input and output data
Hi Jim,
Thanks for your quick reply.
Find the attachment which clearly explains input, condition and the output.

Thanks
Sidda
1,332
Posted By ks_reddy
awk code to ignore the first occurence unknown number of rows in a data column
Hello experts,

Shown below is the 2 column sample data(there are many data columns in actual input file),
Key, Data
A, 1
A, 2
A, 2
A, 3
A, 1
A, 1
A, 1

I need the below output.
Key,...
2,560
Posted By ks_reddy
My Required output
Hi Hanson,

Find below my input and output formats.
The input files are actually comma separated files and also instead of blank words I need comma(,) s.

File1
Date_Time,...
2,560
Posted By ks_reddy
Thanks
Thank you so much Skrynesaver for your quick reply.
But my data has many context columns(10) in each pair of files and also many data columns in both files.
The total pairs of files I have is...
2,560
Posted By ks_reddy
Merging 2 text files when there is a common time stamp column in them
Dear Unix experts and users

I have 2 kinds of files like below, of which I need to merge them in the order of time.
File1:
Date_Time Context D1 D2
04/19/2013_23:48:54.819 ...
1,731
Posted By ks_reddy
Thanks..
Thanks Don, Pamu and Jim,

All the scripts worked well.
Also I forgot to mention the elapsed time in my file with million rows actually varies from few seconds to few hours(based on another...
1,731
Posted By ks_reddy
Calculatin cumulative elapsed time from mm:ss.ss data
Hello all,

I got some time duration data like below and I want to compute the cumulative elapsed time. The data is in MM:SS.SS format. I got struck with logic on what to do when it changes from...
933
Posted By ks_reddy
Thanks
Thanks pamu for your quick reply.
The code you mentioned is doing it's job put it is putting two 'Y' characters at the end of each row.
Can we get rid of that ?
Also on the actual data I have I am...
933
Posted By ks_reddy
Column transformation based on keywords in that column
Hello All,

I have raw data like below. Just 1 column .
X
1
2
3
.
.
Unknown number of rows
Y
X
1
2
.
.
Unknown number of rows
Y where the number of rows between each matching X...
59,420
Posted By ks_reddy
Thanks..
Hello All,

Thanks for your prompt reply. All codes works well.

Sidda
Showing results 1 to 25 of 99

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