10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have been reading old posts and trying to come up with a solution for the below: Use a tab-delimited input file to assign
point to variables that are used to update a specific field, Rank. I really couldn't find too much in the way of assigning points
to variable, but made an attempt at an awk... (4 Replies)
Discussion started by: cmccabe
4 Replies
2. Shell Programming and Scripting
Hi,
I have a file like below
PRUM,67016800 ,CC ,C1,67016800 , ,Y,Y,2 ,CK,BX,FOX ,00000001,EA,00000001,20141120 00:00:00, ,N,Y,Y,CK ABCDEF... (7 Replies)
Discussion started by: mady135
7 Replies
3. Shell Programming and Scripting
Hi Friends,
I have looked around the forums and over online but couldn't figure out how to deal with this problem
input.txt
gene1,axis1/0/1,axis2/0/1
gene1,axis1/1/2,axis2/1/2
gene1,axis1/2/3,axis2/2/3
gene2,axis1/3/4,axis2/3/4
Match on first column and if first column is... (1 Reply)
Discussion started by: jacobs.smith
1 Replies
4. Shell Programming and Scripting
I have some problem with this.
Need to change field #3 to 5 if field #1 = A and filed #2 =B
DataA C 6 T
C B 4 R
A B 3 T
D E 5 4
I would like to do two things if statement is true, but can not get it to work.
Here it prints column #3 if statement is true, and this works
awk '{if... (3 Replies)
Discussion started by: Jotne
3 Replies
5. Shell Programming and Scripting
Hello,
I'm trying the solve the following problem.
I have a file which I intend to use as a csv called master.csv
The columns are separated by commas.
I want to change the text on a specific row in either column 3,4,5 or 6 from xxx to yyy depending upon if column 1 matches a specified pattern.... (3 Replies)
Discussion started by: cyphex
3 Replies
6. Shell Programming and Scripting
I need to replace specific field (x) in a table with new value (y):
Input:
1 2 3 4
5 x 6 7
8 9 0 0
Output:
1 2 3 4
5 y 6 7
8 9 0 0
I have no idea how to do this. (10 Replies)
Discussion started by: setepo
10 Replies
7. Shell Programming and Scripting
I am writing a c++ program that has many calls of pow(input,2). I now realize that this is slowing down the program and these all should be input * input for greater speed.
There should be a simple way of doing this replacement throughout my file with awk, but I am not very familiar with awk.... (2 Replies)
Discussion started by: bluejayek
2 Replies
8. Shell Programming and Scripting
Hi
I am using awk to replace the 4th feild of the input line. My code is below:
REP_LINE=$(echo $Line | awk -v var=$REPL_DT '{$4=var; print}')
It does replaces but all words/phrases after the 4th feild are erased. Is there a way to modify the 4th feild of the input line and to have all... (7 Replies)
Discussion started by: sugan
7 Replies
9. Shell Programming and Scripting
i have bad data for instance, the use of capital letters in the middle of the word.
I identified the errors, made a list and put it in a file error_correction.txt
Incorrect,Correct
VeNOM,Venom
nos,NOS
.
.
.
My data file looks like this:
vgr,bugatti veron,,3.5,Venom,6,.......,....... (14 Replies)
Discussion started by: VGR
14 Replies
10. Shell Programming and Scripting
Hi,
I have been trying to use awk with variables that needs to search for a pattern and replace it with another pattern, the patterns are supplied in a variable. I have tried several different ways without success and hope that someone can help me. Here are the details
echo $UPC
07007457809... (2 Replies)
Discussion started by: jerardfjay
2 Replies