Skip to main content
Tweeted twitter.com/StackUnix/status/1049041818170605569
Fixed formatting
Source Link
RalfFriedl
  • 9.2k
  • 6
  • 26
  • 34

I have "csv" spreadsheet as below

abc,12345,qwerty,A
 
xyz,12380,qwetty,R
 
abc,12389,qwerty,A
 
xyz,12324,qwetty,R

I would like to combine rows with similar values in columns 1, 2 and 4. Also, i would like to replace the last two alphabets of column 3 by "**". Sample of the output is as below:

abc,123**,qwerty,A
 
abc,123**,qwerty,A
 
xyz,123**,qwetty,R
 
xyz,123**,qwetty,R

Total number of lines is more than one Million!

I have "csv" spreadsheet as below

abc,12345,qwerty,A
 
xyz,12380,qwetty,R
 
abc,12389,qwerty,A
 
xyz,12324,qwetty,R

I would like to combine rows with similar values in columns 1, 2 and 4. Also, i would like to replace the last two alphabets of column 3 by "**". Sample of the output is as below:

abc,123**,qwerty,A
 
abc,123**,qwerty,A
 
xyz,123**,qwetty,R
 
xyz,123**,qwetty,R

Total number of lines is more than one Million!

I have "csv" spreadsheet as below

abc,12345,qwerty,A
xyz,12380,qwetty,R
abc,12389,qwerty,A
xyz,12324,qwetty,R

I would like to combine rows with similar values in columns 1, 2 and 4. Also, i would like to replace the last two alphabets of column 3 by "**". Sample of the output is as below:

abc,123**,qwerty,A
abc,123**,qwerty,A
xyz,123**,qwetty,R
xyz,123**,qwetty,R

Total number of lines is more than one Million!

added 55 characters in body
Source Link
user88036
user88036

I have CSV file"csv" spreadsheet as below

abc,12345,qwerty,A

xyz,12380,qwetty,R

abc,12389,qwerty,A

xyz,12324,qwetty,R

abc,12345,qwerty,A

xyz,12380,qwetty,R

abc,12389,qwerty,A

xyz,12324,qwetty,R

I wantwould like to combine rows with similar valuevalues in columncolumns 1,2 2 and 4. AndAlso, i would like to replace the last 2 alphabatestwo alphabets of column 3 as **by "**". Sample of the output is as below.

abc,123**,qwerty,A

abc,123**,qwerty,A

xyz,123**,qwetty,R:

xyz,123**,qwetty,R

abc,123**,qwerty,A

abc,123**,qwerty,A

xyz,123**,qwetty,R

xyz,123**,qwetty,R

Total number of lines is more than 1Million. Can you help with script. Can you please helpone Million!

I have CSV file as below

abc,12345,qwerty,A

xyz,12380,qwetty,R

abc,12389,qwerty,A

xyz,12324,qwetty,R

I want to combine rows with similar value in column 1,2 and 4. And replace last 2 alphabates of column 3 as **. Sample output as below.

abc,123**,qwerty,A

abc,123**,qwerty,A

xyz,123**,qwetty,R

xyz,123**,qwetty,R

Total number of lines is more than 1Million. Can you help with script. Can you please help

I have "csv" spreadsheet as below

abc,12345,qwerty,A

xyz,12380,qwetty,R

abc,12389,qwerty,A

xyz,12324,qwetty,R

I would like to combine rows with similar values in columns 1, 2 and 4. Also, i would like to replace the last two alphabets of column 3 by "**". Sample of the output is as below:

abc,123**,qwerty,A

abc,123**,qwerty,A

xyz,123**,qwetty,R

xyz,123**,qwetty,R

Total number of lines is more than one Million!

Source Link
Arpit
  • 11
  • 2

Group rows in one file based on column value

I have CSV file as below

abc,12345,qwerty,A

xyz,12380,qwetty,R

abc,12389,qwerty,A

xyz,12324,qwetty,R

I want to combine rows with similar value in column 1,2 and 4. And replace last 2 alphabates of column 3 as **. Sample output as below.

abc,123**,qwerty,A

abc,123**,qwerty,A

xyz,123**,qwetty,R

xyz,123**,qwetty,R

Total number of lines is more than 1Million. Can you help with script. Can you please help