Yes you are missing something that... time.out file is very old file and it have data form past 5 years... so it have to be the final file and the reason i have used this code is
echo >> time.out; tr -d '\n' < runtime.out >> time.out
because the data in runtime.out is like this
hi
i have records in my input file like this
aaa|1234||2bc||rahul|tamilnadu
bba|2234||b4c||bajaj|tamilnadu
what i am expecting is in between two pipes if there is no character it should be replaced with null or 0
so my file will look like this
aaa|1234|null|2bc|0|rahul|tamilnadu... (4 Replies)
Ok, I am brand new to UNIX and I am trying to learn a cross between basic script and database use. I had got some ideas off the net on simple ideas for learning UNIX. I am working on creating a simple phone book program that allows myself to enter our employees from work into a phone book text... (0 Replies)
All,
I am trying to figure out a script to run in windows that will allow me to match on First column in file1 to 8th Column in File2 then
Insert file1 column2 to file2 column4 then create a new file.
File1:
12345 Sam
12346 Bob
12347 Bill
File2:... (1 Reply)
Hi,
I have two files , one file with data file with attributes that need to be sent to another file to generate a predefined format.
Example:
File.txt
AP|{SSHA}VEEg42CNCghUnGhCVg==
APVG3|{SSHA}XK|"password"
AP3|{SSHA}XK|"This is test"
....
etc
---------
test.sh has... (1 Reply)
Hi,
i have 2 input files which are file1.txt and file2.txt. I need to extract data from file1.txt and file2.txt and save it in file3.txt like example below:-
File1.txt
ID scrap1
Name scrap1
start 1
end 10
ID scrap2
Name scrap2
start 11
end ... (4 Replies)
Hi All,
I have two input file and need to generate a CSV file. The existing report just "GREP" the records with the Header and Tailer records with the count of records.
Now i need to split the data into 25 records each in the same CSV file.
id_file (Input file )
227050994
232510151... (4 Replies)
Hi All,
how can i edit my original data and add more data if my 2nd script outputs SUCESS?
ex.
input file:
1.txt
nik,is,the
1script.sh
if 2ndscript.sh output SUCCESS then i'm going to edit my input file and add data best,pogi..
sample outputdata.
nik,is,the,best,pogi
2ndscript.sh... (3 Replies)
Hello,
I have 2 files delimited by "|".
File1:
1|New York
12| Buffalo
599| Syracuse
File2:
56 Kennedy |1
9 Burridge Pl|15
98 BELL ROCK |599
My goal: Is to replace the numerical numbers in "File 2" (second field, not street address) with the corresponding city names from... (2 Replies)
this section of the awk code i have here takes file to work with from the user.
the user specifies the file name from the command line and the file name is assigned to the variable $FLIST
awk 'BEGIN {
while((getline < "'${FLIST}'")>0)
S
FS="\n"; RS="}\n"
}
now, i dont want... (5 Replies)
The below awk improved bu @MadeInGermany, works great as long as the input file has data in it in the below format:
input
chrX 25031028 25031925 chrX:25031028-25031925 ARX 631 18
chrX 25031028 25031925 chrX:25031028-25031925 ARX 632 14... (3 Replies)
Discussion started by: cmccabe
3 Replies
LEARN ABOUT PHP
px_insert_record
PX_INSERT_RECORD(3)PX_INSERT_RECORD(3)px_insert_record - Inserts record into paradox databaseSYNOPSIS
int px_insert_record (resource $pxdoc, array $data)
DESCRIPTION
Inserts a new record into the database. The record is not necessarily inserted at the end of the database, but may be inserted at any
position depending on where the first free slot is found.
The record data is passed as an array of field values. The elements in the array must correspond to the fields in the database. If the
array has less elements than fields in the database, the remaining fields will be set to null.
Most field values can be passed as its equivalent php type e.g. a long value is used for fields of type PX_FIELD_LONG, PX_FIELD_SHORT and
PX_FIELD_AUTOINC, a double values is used for fields of type PX_FIELD_CURRENCY and PX_FIELD_NUMBER. Field values for blob and alpha fields
are passed as strings.
Fields of type PX_FIELD_TIME and PX_FIELD_DATE both require a long value. In the first case this is the number of milliseconds since mid-
night. In the second case this is the number of days since 1.1.0000. Below there are two examples to convert the current date or timestamp
into a value suitable for one of paradox's date/time fields.
Note
This function is only available if pxlib >= 0.6.0 is used.
PARAMETERS
o $pxdoc
- Resource identifier of the paradox database as returned by px_new(3).
o $data
- Associated or indexed array containing the field values as e.g. returned by px_retrieve_record(3).
RETURN VALUES
Returns FALSE on failure or the record number in case of success.
EXAMPLES
Example #1
Set the date/time fields in a paradox database to the current date/time
<?php
$px = px_new();
$fp = fopen("test.db", "w+");
px_create_fp($px, $fp, array(array("timestamp", "@"), array("time", "T"), array("date", "D")));
$curdate = getdate();
$jd = gregoriantojd($curdate["mon"], $curdate["mday"], $curdate["year"]);
$days = $jd - 1721425; /* Number of days between 1.1.4714 b.c. and 1.1.0000 */
$secs = $curdate["hours"]*3600 + $curdate["minutes"]*60 + $curdate["seconds"];
px_insert_record($px, array($days*86400000.0 + $secs*1000.0, $secs*1000.0, $days));
$curtimestamp = microtime(true);
$days = (int) ($curtimestamp/86400);
$secs = $curtimestamp - ($days * 86400.0);
$days += 2440588; /* Number of days between 1.1.4714 b.c. and 1.1.1970 */
$days -= 1721425; /* Number of days between 1.1.4714 b.c. and 1.1.0000 */
px_insert_record($px, array($days*86400000.0 + $secs*1000.0, $secs*1000.0, $days));
for($i=0; $i<2; $i++) {
$rec = px_retrieve_record($px, $i);
echo px_timestamp2string($px, $rec["timestamp"], "n/d/Y H:i:s")."
";
echo px_date2string($px, $rec["date"], "n/d/Y")."
";
}
px_close($px);
px_delete($px);
?>
The above example will output:
2/21/2006 21:42:30
2/21/2006
2/21/2006 20:42:30
2/21/2006
The Julian day count as passed to jdtogregorian(3) has a different base of 1.1.4714 b.c. and must therefore be calculated by adding
1721425 to the day count used in the paradox file. Turning the day count into a timestamp is easily done by multiplying with 86400000.0 to
obtain milli seconds.
SEE ALSO px_update_record(3)PHP Documentation Group PX_INSERT_RECORD(3)