is there a way to choose the complement from the output from the sequense in "ksh -o vi"
root# ls
testa testb
root# cat tes
1) testa
2) testb
root# cat tes <-- what to do now?
this output looks like a select function, otherwise the numbers wouldn't make sense, is there a chance to use... (2 Replies)
I have:
datafile contains 1234567890
>wc -c datafile | awk '{print $1}'
>11
The program
#!/bin/ksh
let n = (wc -c datafile | awk '{print $1}')
echo $n
I expect n to be 11 but it gives error message. What is wrong with this statement?
Thanks! (3 Replies)
Hello,
First of all, I am trying to duplicate the sum command using ksh/nawk
Lets assume the following algorithms work just fine and there is no calculation errors what so ever (which I doubt at this minute).
For now, I wanna make sure the script uses the BSD algorithim if -r is used... (0 Replies)
Ok, So up front I'm going to say that I'm a very elementary scripter, and I tend to use tools I don't fully understand, but I shotgun at something until I can get it to work...that said, I can't for the life of me understand why I can't get this to go down the way I want it to.
The goal:
-to... (6 Replies)
I'm not confident at all on how arrays work.
I want to know how to set arrays in ksh and in nawk (is there a difference??)
if someone can show me some examples of both that will be great. Tried to look up on the net but was confusing me more.
Any help would be appreciated. (2 Replies)
Hello Everyone,
I don't know what is wrong with this:
Is it that nawk cannot run a ".sh" script or is it not treating "." as a literal. If so how to make "." be treated as a literal in "nawk" statemnts?
Thanks in Advance (2 Replies)
hi all
i have the following portion in an xml file:
</n:AOMessage>
<?xml version="1.0" encoding="UTF-8"?>
<n:AOMessage xmlns:n="urn:ao:hs:update:shell" xmlns:bo="urn:ao:hs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:ao:hs:update:shell... (0 Replies)
I am trying to use either awk or nawk in ksh88 to grep the word "Reason" in multiple files and than print the lines that say "Reason" in a particular format that is different from how they would normally print. The original input is as follows:
... (10 Replies)
Hey all. I'm writing a script to automatically login to a router, change directories to where crashfiles are located, then listing all files in that directory. This is where I'm at so far and wish to have some user interaction to choose the files.
What I am trying to do is list the files and get... (1 Reply)
Discussion started by: Gouda
1 Replies
LEARN ABOUT PHP
px_date2string
PX_DATE2STRING(3)PX_DATE2STRING(3)px_date2string - Converts a date into a string.SYNOPSIS
string px_date2string (resource $pxdoc, int $value, string $format)
DESCRIPTION
Turns a date as it stored in the paradox file into human readable format. Paradox dates are the number of days since 1.1.0000. This func-
tion is just for convenience. It can be easily replaced by some math and the calendar functions as demonstrated in the example below.
PARAMETERS
o $pxdoc
- Resource identifier of the paradox database as returned by px_new(3).
o $value
- Value as stored in paradox database field of type PX_FIELD_DATE.
o $format
- String format similar to the format used by date(3). The placeholders support by this function is a subset of those supported by
date(3) (Y, y, m, n, d, j, L).
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
Turn a paradox date into a human readable form
<?php
$px = px_new();
/* make up a date as it could be stored in */
/* a date field of a paradox db. */
/* 700000 days since 1.1.0000. */
$days = 700000;
/* Use the calendar functions to print a */
/* human readable format of the date */
echo jdtogregorian($days+1721425)."
";
/* px_date2string() outputs the same */
echo px_date2string($px, $days, "n/d/Y")."
";
px_delete($px);
?>
The above example will output:
7/15/1917
7/15/1917
SEE ALSO px_timestamp2string(3), jdtogregorian(3).
PHP Documentation Group PX_DATE2STRING(3)