10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file which looks like this:
1 3 5 5 3 2
1 5 3 6 3 2
0 5 6 3 2 9
0 4 5 6 4 9
In the first column, instead of 1, I want to place +1 and instead of 0, I want -1 to be put. So the generated file should look like this:
+1 3 5 5 3 2
+1 5 3 6 3 2
-1 5 6 3 2 9
-1 4 5 6 4 9
Just to... (9 Replies)
Discussion started by: shoaibjameel123
9 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I am using the following code to change NA to X in only the 5th column of my text file:
awk '{gsub("NA","x",$5)}1' in.file > out.file
How can I modify this code if I want to change NA to X in multiple columns of the text file (i.e. columns 5,6 and 7). Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies
3. Shell Programming and Scripting
Hi Experts,
I am new to shell scripting. Need some help in doing one task given by the customer.
The sample record in a file is as follows:
3538,,,,,,ID,ID1,,,,,,,,,,,
It needs to be the following:
3538,,353800,353800,,,ID,ID1,,,,,COLX,,,,,COLY,
And i want to modify this record in... (3 Replies)
Discussion started by: sugarcane
3 Replies
4. Shell Programming and Scripting
Hello all
According to the following file (orignal one contains 200x times the same structure...) I was wondering if someone could help me to print <byte>??</byte> values
example, running this script/command like
./script.sh xxapp
I would expect as output: 102 116 112
./script.sh xxapp2... (2 Replies)
Discussion started by: cabrao
2 Replies
5. Shell Programming and Scripting
Hi,
Example File:
(jumped,
bumped,
)
how to
jumped,
FROM tree;
EXIT
I have some hundreads of files like this with the different words and I want to remove the comma before the bracket and also I have to remove the comma before FROM word.
I am trying to use this command :
awk '... (5 Replies)
Discussion started by: rajshashi
5 Replies
6. UNIX for Dummies Questions & Answers
I'm changing some html code on multiple web pages and I need to match particular phrases but keep some text within each phrase.
E.G. I need to change this line:
<DIV id="heading">Description:</DIV>
into
<span class="hlred">Description:</span><br />
The text "Description:" may... (2 Replies)
Discussion started by: hal8000
2 Replies
7. Shell Programming and Scripting
Hi All,
I have two files
file1:
abc,def,ghi,5,jkl,mno
pqr,stu,ghi,10,vwx,xyz
cba,ust,ihg,4,cdu,oqw
file2:
ravi,def,kishore
ramu,ust,krishna
joseph,stu,mike
I need two output files as follows
In my above example, each row in file1 has 6 fields and each row in file2 has 3... (3 Replies)
Discussion started by: yerruhari
3 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
I have two files
file1:
abc,def,ghi,5,jkl,mno
pqr,stu,ghi,10,vwx,xyz
cba,ust,ihg,4,cdu,oqw
file2:
ravi,def,kishore
ramu,ust,krishna
joseph,stu,mike
I need two output files as follows
In my above example, each row in file1 has 6 fields and each row in file2 has 3... (1 Reply)
Discussion started by: yerruhari
1 Replies
9. UNIX for Advanced & Expert Users
Hi All,
I have two files
file1:
abc,def,ghi,5,jkl,mno
pqr,stu,ghi,10,vwx,xyz
cba,ust,ihg,4,cdu,oqw
file2:
ravi,def,kishore
ramu,ust,krishna
joseph,stu,mike
I need two output files as follows
In my above example, each row in file1 has 6 fields and each row in file2 has 3... (1 Reply)
Discussion started by: yerruhari
1 Replies
10. Shell Programming and Scripting
Hi,
I am writing a shell program that executes a lot of Oracle SQL Files on different databases based on the enviroment setting value. I am trying to design a parameter file where i can store the environment values for all the databases in the below format
Environment File
File Name... (6 Replies)
Discussion started by: rajan_san
6 Replies