Sed/awk to find negative numbers and replace with 1?
Greetings. I have a three column file, and there are some numbers in the second column that are <1. However I need all numbers to be positive, thus need to replace all those numbers with just one. I feel like there must be a simple way to use awk to find these numbers and sed to replace but can't make it work.
Hi :)
I have some problems with "FOR"...
I have a text file in this format:
name1
www.link1/random_number
name2
www.link2/random_number
name3
www.link3/random_number
...
(Names and info changes)
Now, I need: (4 Replies)
Hi this is my first time posting ever. I'm relatively new in using AWK/SED, I've been trying many a solution. I'm trying to replace the 59th column in a file where if I encounter '' then I would like to replace it with the word NULL.
example
0 , '' , '' , 0 , 195.538462
change it to
0... (5 Replies)
hi,
i have file say email.temp looks like
Bell_BB 17
Bell_MONTHLY 888
SOLO_UNBEATABLE 721
and another file r3
Bell BB,Bell_BB
Bell,Bell_MONTHLY
SOLO,SOLO_UNBEATABLE
i want email.temp files $1 say Bell_BB should be replaced by r3 Bell BB and Bell_MONTHLY by... (2 Replies)
How would I do this? How could i use <> symbols for numbers in the find/replace code below?
perl -pi -e 's/test/tst/'
OR is there a better way?
100 5000 2 432 4 2 33 4 5 6 65 300 301
needs to be:
100 300 2 300 4 2 33 4 5 6 65 300 300
also it might not always need spaces... i... (12 Replies)
Dear board,
(I am trying to post this the 3rd time, seems there's some conflicts with my firefox with this forum, now use IE)
------
yes, I have searched the forum, but seems my ? is too complicated.
------------origianl file ---------------
\storage\qweq\ertert\ertert\3452\&234\test.rec... (4 Replies)
I have looked around and there are several examples of how to use sed, but I don't think any of them help me very much with what I am trying to do.
I have a text file like this....
1! SRCNAM = 00001 !
1! X = 50.0000, 0.0000,... (10 Replies)
Hello all. I am a beginner UNIX user who is using UNIX to work on a bioinformatics project for my university.
I have a bit of a complicated issue in trying to use sed (or awk) to "find and replace" bases (letters) in a genetics data spreadsheet (converted to a text file, can be either... (3 Replies)
All,
I have thousands of lines in a file with following format
DATA=_ONE_XXX_YYY_CCC_HHHG_
DATA1=_GGG_JJJJ_HHH_UUU_JJJJ_HHHH_LLL_
DATA3=_MMM_GG_NN_QQQQ_FFF_III_
I want to replace _ with . by ignoring the first (=_) and last (_)
So that out put should looks like... (4 Replies)
i Have a file as following
view pz19a0c0/1000T_J_3MoDw9DSLh1ZsCubdua-LKOQmbtiVgkIsiMbSiwF467?sessionId=15451401994597121249
view pz19a0c0/100086X67pR0MwzWnhhSO6sAEoxeFMyhh-IIbUCCdxicaQM4FC9?sessionId=154514019945971212494898
view/cart ... (5 Replies)
Discussion started by: Raghuram717
5 Replies
LEARN ABOUT PHP
db2_field_scale
DB2_FIELD_SCALE(3) 1 DB2_FIELD_SCALE(3)db2_field_scale - Returns the scale of the indicated column in a result setSYNOPSIS
int db2_field_scale (resource $stmt, mixed $column)
DESCRIPTION
Returns the scale of the indicated column in a result set.
PARAMETERS
o $stmt
- Specifies a statement resource containing a result set.
o $column
- Specifies the column in the result set. This can either be an integer representing the 0-indexed position of the column, or a
string containing the name of the column.
RETURN VALUES
Returns an integer containing the scale of the specified column. If the specified column does not exist in the result set,
db2_field_scale(3) returns FALSE.
SEE ALSO db2_field_display_size(3), db2_field_name(3), db2_field_num(3), db2_field_precision(3), db2_field_type(3), db2_field_width(3).
PHP Documentation Group DB2_FIELD_SCALE(3)