First off: You can do all that in a single sed and forego the whole script as well as the half dozen temporary files:
Test this first if it gives you the correct answer in every case. If you are satisfied with the outcome of this you can put it into loop, like this, which solves your second problem:
I hope this helps.
bakunin
Thank bakunin.
for the 1st 1 it only can print out the line with
symbol.
Hi,
I have a config_file.cfg with the content:
FILE_ID_1=1
FILE_FTP_ID_1=<FTP_SERVER1.COM>
....
FILE_ID_2=2
FILE_FTP_ID_2=<FTP_SERVER2.COM>
....
so on for 28 times.
As you might have guessed it; the script I have to write is to read this config file and get the FTP server... (3 Replies)
I am a newbie and would like some help with the following -
Trying to search fileA for a string similar to -
AS11000022010 30.4 31.7 43.7 53.8 60.5 71.1 75.2 74.7 66.9 56.6 42.7 32.5 53.3
I then want to replace that string with a string from fileB - ... (5 Replies)
Hi to all,
I got this content/pattern from file http.log.20110808.gz
mail1 httpd: Account Notice: close igchung@abc.com 2011/8/7 7:37:36 0:00:03 0 0 1
mail1 httpd: Account Information: login sastria9@abc.com proxy sid=gFp4DLm5HnU
mail1 httpd: Account Notice: close sastria9@abc.com... (16 Replies)
hi everyone,
im stuck in here with shell :) can you help me??
i have a directory with alot files (genbank files ... all ended in .gbk ) more than 1000 for sure ... and i want to read each one of them and search for some information and if i found the right one i save in new file with new... (6 Replies)
Hi ,
I have been trying to write a perl script to do this job. But i am not able to achieve the desired result. Below is my code.
my $current_value=12345;
my @users=("bob","ben","tom","harry");
open DBLIST,"<","/var/tmp/DBinfo";
my @input = <DBLIST>;
foreach (@users)
{
my... (11 Replies)
I have a flat file that looks like this, let's call it Chromosome_9.txt:
FT /Gene_Name="Guanyl-Acetylase 9"
FT /Gene_Number"36952"
FT /Gene_Name="Endoplasmic Luciferase"
FT /Gene_Number"36953"
FT ... (4 Replies)
Is there a single Command in Unix to get the following Information when searching for files containing one or more strings in a Unix Directory (including sub directories within it) :
1) Complete filename ( path and filename)
2) Owner of the file
3) Size of the file
4) Last Modified date... (3 Replies)
I have two files:
file 1:
hello.com neo.com,japan.com,example.com
news.net xyz.com, telecom.net, highlands.net, software.com
example2.com earth.net, abc.gov.uk
file 2:
neo.com
example.com
abc.gov.uk
file 2 are the search keys to search in file 1 if any of the search... (7 Replies)
I'm trying to find a way to search a range of similar words in a file. I tried using sed but can't get it right:sed 's/\(ca01\)*//'It only removes "ca01" but leaves the rest of the word. I still want the rest of the information on the lines just not these specific words listed below. Any... (3 Replies)
Hi guys,
I have a text file named file1.txt that is formatted like this:
001 , ID , 20000
002 , Name , Brandon
003 , Phone_Number , 616-234-1999
004 , SSNumber , 234-23-234
005 , Model , Toyota
007 , Engine ,V8
008 , GPS , OFF
and I have file2.txt formatted like this:
... (2 Replies)
Discussion started by: An0mander
2 Replies
LEARN ABOUT PHP
stats_cdf_beta
STATS_CDF_BETA(3) 1 STATS_CDF_BETA(3)stats_cdf_beta - CDF function for BETA Distribution. Calculates any one parameter of the beta distribution given values for the others.SYNOPSIS
float stats_cdf_beta (float $par1, float $par2, float $par3, int $which)
DESCRIPTION
Method Cumulative distribution function (P) is calculated directly by code associated with the following reference. DiDinato, A. R. and
Morris, A. H. Algorithm 708: Significant Digit Computation of the Incomplete Beta Function Ratios. ACM Trans. Math. Softw. 18 (1993),
360-373. Computation of other parameters involve a search for a value that produces the desired value of P. The search relies on the mono-
tonicity of P with the other parameter. Note The beta density is proportional to t^(A-1) * (1-t)^(B-1) Arguments P -- The integral from 0
to X of the chi-square distribution. Input range: [0, 1]. Q -- 1-P. Input range: [0, 1]. P + Q = 1.0. X -- Upper limit of integration of
beta density. Input range: [0,1]. Search range: [0,1] Y -- 1-X. Input range: [0,1]. Search range: [0,1] X + Y = 1.0. A -- The first parame-
ter of the beta density. Input range: (0, +infinity). Search range: [1D-100,1D100] B -- The second parameter of the beta density. Input
range: (0, +infinity). Search range: [1D-100,1D100] STATUS -- 0 if calculation completed correctly -I if input parameter number I is out of
range 1 if answer appears to be lower than lowest search bound 2 if answer appears to be higher than greatest search bound 3 if P + Q .ne.
1 4 if X + Y .ne. 1 BOUND -- Undefined if STATUS is 0 Bound exceeded by parameter number I if STATUS is negative. Lower search bound if
STATUS is 1. Upper search bound if STATUS is 2.
PARAMETERS
o $par1
-
o $par2
-
o $par3
-
o $which
- Integer indicating which of the next four argument values is to be calculated from the others. Legal range: 1..4 which = 1 :
Calculate P and Q from X,Y,A and B which = 2 : Calculate X and Y from P,Q,A and B which = 3 : Calculate A from P,Q,X,Y and B which
= 4 : Calculate B from P,Q,X,Y and A
RETURN VALUES
STATUS -- 0 if calculation completed correctly -I if input parameter number I is out of range 1 if answer appears to be lower than lowest
search bound 2 if answer appears to be higher than greatest search bound 3 if P + Q .ne. 1 4 if X + Y .ne. 1
PHP Documentation Group STATS_CDF_BETA(3)