10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Experts,
I am new to UNIX. One of my file records are like below
220 IN C/A 515013 NULL NULL
220 IN C/A 515017 NULL NULL
225 IN C/A 333701 NULL NULL
225 IN C/A 515034 NULL NULL
225 IN C/A 499201 NULL NULL
225 IN C/A 499202 NULL NULL
The above mentioned records delimiter is... (4 Replies)
Discussion started by: suresh_target
4 Replies
2. Shell Programming and Scripting
Hi - I have a file "file1" of below format. Its a comma seperated file. Note that each string is enclosed in double quotes.
"abc","-0.15","10,000.00","IJK"
"xyz","1,000.01","1,000,000.50","OPR"
I want the result as:
"abc","-0.15","10000.00","IJK"
"xyz","1,000.01","1000000.50","OPR"
I... (8 Replies)
Discussion started by: njny
8 Replies
3. Shell Programming and Scripting
Hi Friends,
I looked up online, but couldn't figure out a proper solution.
I have an input file where the columns are separated by multiple spaces and the column content is separated by single space.
For example,
Chr1 hello world unix is fun
In the above example, chr1 is first... (3 Replies)
Discussion started by: jacobs.smith
3 Replies
4. Shell Programming and Scripting
This is a file that I have
test line 1 (55)
)
test line 2 (45)
)
I would like to change all the parens in position 1 of this file to a );
i only want to check position 1 in every line of the file. I have tried different varations of sed, but cannot seem to be able to limit it to... (1 Reply)
Discussion started by: JoeG
1 Replies
5. UNIX for Dummies Questions & Answers
Hi experts, I'm looking for a unix solution to replacing "NA" within a matrix with the mean of the column:
$cat file
ID a b c d
day 10 5 100 50
cat 20 6 200 50
dog NA 8 NA 50
car 15 NA NA ... (3 Replies)
Discussion started by: torchij
3 Replies
6. Shell Programming and Scripting
Hi,
I have a requirement to search for a pattern in each line in a file and remove the in between words till the 3rd occurrence of double quote (").
Ex: CREATE TABLE "SCHEMANAME"."AMS_LTV_STATUS"
(Note: "SCHEMANAME" may changes for different schemas. Its not a fixed value)
I need to... (2 Replies)
Discussion started by: satyaatcgi
2 Replies
7. UNIX for Dummies Questions & Answers
I have a data with 4 columns separete with tab delimiter as following:
A B {123} E{456}
C D {789} T{159}
My expected result as following: (become 5 columns)
A B {123} E {456}
C D {789} T {159}
Is there any way to separate the 4th column to 2 field by using the tab delimiter?
I... (6 Replies)
Discussion started by: newbie2011
6 Replies
8. Shell Programming and Scripting
Hi,
I need an awk script (or whatever shell-construct) that would take data like below and get the max value of 3 column, when grouping by the 1st column.
clientname,day-of-month,max-users
-----------------------------------
client1,20120610,5
client2,20120610,2
client3,20120610,7... (3 Replies)
Discussion started by: ckmehta
3 Replies
9. Shell Programming and Scripting
Hi all ,
I have to write a shell script that takes a number as input , like 123
and the output will be 6 ,i.e the output will be the sum of digits of the input.
I have an idea as follows,
echo "123"|fold -1|tr '\n' '+'|bc
But the problem is after " echo "123"|fold -1|tr '\n' '+' "... (5 Replies)
Discussion started by: M.Choudhury
5 Replies
10. UNIX for Advanced & Expert Users
I want to know how to, given a string like W87151WR71C, if the 4th and 5th character (in this case 15) are greater than 45, then to add 1 to the 3rd character (in this case 7) and assign the revised string the variable name MODSTRING.
Thanks in advance. This is ultimately to grab info from... (6 Replies)
Discussion started by: glev2005
6 Replies