10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello All,
I am having the file as below .I need to replace column 9-12 with some other values. In the below file I need to replace 1509 to 1508 and 1508 to 1507 .Can you please help me in how to do that
Thanks,
Arun
... (10 Replies)
Discussion started by: arunkumar_mca
10 Replies
2. Shell Programming and Scripting
Hello everyone,
i need to replace in the second column of my csv file, points by nothing and dash by comma like this:
Input:
1 2 1;12.111.312-2;1.2;2;1-3
2 1 1;11.212.331-1;3.3;1;2-2
Output:
1 2 1;12111312;2;1.2;2;1-3
2 1 1;11212331;1;3.3;1;2-2
SED or PERL commands preferably.
... (7 Replies)
Discussion started by: satir
7 Replies
3. Shell Programming and Scripting
Hi,
I want to replace a chain of if-else statement in an old AWK file with values from Db2 table or CSV file. The part of code is below...
if (start_new_rec=="true"){
exclude_user="false";
user=toupper($6);
match(user, "XXXXX.");
if (RSTART ==2 ) {
... (9 Replies)
Discussion started by: asandy1234
9 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have a tab delimited text file where some lines have the string "NA" in the second column. For these lines, I want to replace NA with the value in the first column, the symbol underscore followed by the value in the fourth column. How do I go about doing that? Thanks!
Input:
1 ... (3 Replies)
Discussion started by: evelibertine
3 Replies
5. Shell Programming and Scripting
Hi, i need help on replacing negative values in a column with 0. any quick fix on this? thanks much. for instance,
input:
1
2.3
-0.4
-25
12
13
45
-12
desired output
1
2.3
0
0
12
13
45 (4 Replies)
Discussion started by: ida1215
4 Replies
6. UNIX for Dummies Questions & Answers
Hi Gurus,
I have a tab separated text file with two columns. I would like to make the first column values as headings for the second column values.
Ex.
>value1 subjects
>value2 priorities
>value3 requirements
...etc
and I want to have a file
>value1
subjects
>value2
priorities... (4 Replies)
Discussion started by: Unilearn
4 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have a text file in the following format:
Code:
13412 NA06985 0 0 2 46.6432798439 4 4 4 4
13412 NA06991 NA06993 NA06985 2 48.8478948517 4 4 2 4
13412 NA06993 0 0 1 45.8022601455 4 4 2 4
13401 NA06994 0 0 1 48.780669145 4 4 4 4
13401 NA07000 0 0 2 47.7312017846 2 4 4 4 ... (2 Replies)
Discussion started by: evelibertine
2 Replies
8. UNIX for Dummies Questions & Answers
I have a text file in the following format:
13412 NA06985 0 0 2 46.6432798439 4 4 4 4
13412 NA06991 NA06993 NA06985 2 48.8478948517 4 4 2 4
13412 NA06993 0 0 1 45.8022601455 4 4 2 4
13401 NA06994 0 0 1 48.780669145 4 4 4 4
13401 NA07000 0 0 2 47.7312017846 2 4 4 4
13402 NA07019... (3 Replies)
Discussion started by: evelibertine
3 Replies
9. Shell Programming and Scripting
Please help me with an shell / awk script to achieve following;
File-1:
ABCDW01 12322 23322
BDADW01 22232 24453
EDFAW00 32232 23422
and so on, notice that the first coloumn is a code and the another file contains the real value of each entry in the first colum above but not in a... (4 Replies)
Discussion started by: digipak
4 Replies
10. Shell Programming and Scripting
Hi All,
I have a file which is having 3 columns as (string string integer)
a b 1
x y 2
p k 5
y y 4
.....
.....
Question:
I want get the unique value of column 2 in a sorted way(on column 2) and the sum of the 3rd column of the corresponding rows. e.g the above file should return the... (6 Replies)
Discussion started by: amigarus
6 Replies