Are you talking about printing it to the screen, or printing out a hard copy?
If you mean to the screen, then you might have something like:
I dont know how your program is set up, but it sounds like you are using case statements. You would put the output (echo) in the appropriate portion of the case.
Read the bash or ksh man page for information on how to use the case statement.
I would recommend that you pick up a good Unix book that includes a section on shell scripting. Several have been recommended in different threads recently on this board.
Using the date command
how do get yesterday's date??
e.g.
date '+%b%e%Y'
July 30 2002
I need to get
July 29 2002
using the date command.
Thanx
(p.s. sorry if it's a very obvious question) (6 Replies)
I want to get previous date from date command. I am using ksh shell.
Exmp:
today is 2008.09.04
I want the result : 2008.09.03
Please help.
Thanks in advance. (4 Replies)
Hi All.
I'm using date -a to 'drift' the time forward / backwards. The question is - how do I know when its finished 'drifting' ? On some systems I have another time reference I can use but not always.
thanks (1 Reply)
Hi is it possible to give the date command like 24th July 2009
ive tried
DATE=`date "+%d%m%Y"
echo $DATE
that only replies 2009 correctly. not sure how to display the month in full or if unix knows how to do i.e 2nd, 24th, 3rd (1 Reply)
Hi
I want to get tomorrow and yesterday date from date command. My shell is KSH and server is AIX. I tried several options, but unable to do. Please help on this.
Regards
Rajesh (5 Replies)
Hi all,
Need an urgent help on the below scenario.
script:
awk -F","
'BEGIN { #some variable assignment}
{ #some calculation and put values in array}
END {
year=#getting it from array and assume this will be 2014
month=#getting it from array and this will be 05
date=#... (7 Replies)
HI,
Can anyone tell me how to pull the date and file name separated by a space using the find command or any other command. I want to look through several directories and based on a date timeframe (find -mtime -7), output the file name (without the path) and the date(in format mmddyyyy) to a... (2 Replies)
current date command runs well
awk -v t="$(date +%Y-%m-%d)" -F "'" '$1 < t' myname.dat
subtract 30 days fails
awk -v t="$(date --date="-30days" +%Y-%m-%d)" -F "'" '$1 < t' myname.dat
awk command in hp unix subtract 30 days automatically from current date without date illegal option error... (20 Replies)
Discussion started by: kmarcus
20 Replies
LEARN ABOUT PHP
geoip_id_by_name
GEOIP_ID_BY_NAME(3) 1 GEOIP_ID_BY_NAME(3)geoip_id_by_name - Get the Internet connection typeSYNOPSIS
int geoip_id_by_name (string $hostname)
DESCRIPTION
The geoip_id_by_name(3) function will return the Internet connection type corresponding to a hostname or an IP address.
The return value is numeric and can be compared to the following constants:
o GEOIP_UNKNOWN_SPEED
o GEOIP_DIALUP_SPEED
o GEOIP_CABLEDSL_SPEED
o GEOIP_CORPORATE_SPEED
PARAMETERS
o $hostname
- The hostname or IP address whose connection type is to be looked-up.
RETURN VALUES
Returns the connection type.
EXAMPLES
Example #1
A geoip_id_by_name(3) example
This will output the connection type of the host example.com.
<?php
$netspeed = geoip_id_by_name('www.example.com');
echo 'The connection type is ';
switch ($netspeed) {
case GEOIP_DIALUP_SPEED:
echo 'dial-up';
break;
case GEOIP_CABLEDSL_SPEED:
echo 'cable or DSL';
break;
case GEOIP_CORPORATE_SPEED:
echo 'corporate';
break;
case GEOIP_UNKNOWN_SPEED:
default:
echo 'unknown';
}
?>
The above example will output:
The connection type is corporate
PHP Documentation Group GEOIP_ID_BY_NAME(3)