Sponsored Content
Full Discussion: Validate and Calculate
Top Forums Shell Programming and Scripting Validate and Calculate Post 302367984 by Shellslave on Wednesday 4th of November 2009 01:29:09 AM
Old 11-04-2009
MySQL

Thanks a lot Frans Smilie

i figured out another solution as below,

Code:
if [ $TIME1 -gt $TIME2 ];then
TIME2=`echo $TIME2+864| bc`
fi

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

validate

hi need help here, a bit of code im doing requires a number to be enetered i have got validation and loop if its outside a ceratain range, but was wondering what code i need to validate if a character has been entered. cheers (3 Replies)
Discussion started by: ruffenator
3 Replies

2. Shell Programming and Scripting

validate against a file

Hello all, I am having problem in writing a if condition for the following: I have a file Instance.dat which has: #Server Environment server1 dev server2 dev server3 sit #!/bin/ksh ENV=dev for i in $( cat Instances.dat | grep -v '#' |awk {'print $2'} ) do if ]... (7 Replies)
Discussion started by: chiru_h
7 Replies

3. Shell Programming and Scripting

How to Validate

I have one script by which I am taking Extraction Schedule in the following format ,,,...... Here I want validate the Input from user is okey or not. Let say i have one variable SCH SCH=12:34,23:12,11:20 Could you please tell me how I will validate it. HH & MM Both should be Numeric HH... (10 Replies)
Discussion started by: SanjayLinux
10 Replies

4. Shell Programming and Scripting

Validate date

Hi I am beginner to UNIX. I wanted to help for how to write script to validate date. Please help me. (2 Replies)
Discussion started by: giridher2000
2 Replies

5. Shell Programming and Scripting

How to validate a column?

Dear guru's, I am learning shellscripting and now I 'm struggeling with this problem: When the number in the left column is equal or higer then 200, I want to send an email to "postmaster" @ the corresponding domain in the right column. 220 shoes.com 217 dishwashers.net 209 ... (11 Replies)
Discussion started by: algernonz
11 Replies

6. Shell Programming and Scripting

Validate the file

How do we validate the header file. The file number should increament by 1 (position 17 to 19) if not abend the process. first week ABC0001 20100101123 second week ABC0001 20100108124 Third week ABC0001 20100115125 (7 Replies)
Discussion started by: zooby
7 Replies

7. Shell Programming and Scripting

Calculate age of a file | calculate time difference

Hello, I'm trying to create a shell script (#!/bin/sh) which should tell me the age of a file in minutes... I have a process, which delivers me all 15 minutes a new file and I want to have a monitoring script, which sends me an email, if the present file is older than 20 minutes. To do... (10 Replies)
Discussion started by: worm
10 Replies

8. Shell Programming and Scripting

validate timestamp

How to validate the user supplied timestamp? Ther requirement is as follows. While invoking the script, the parameters passed to the script are minimum and maixmum timestamps. let's say min_tstmp and max_tstmp ksh abc.ksh 2011-09-01-00:00:00 2011-12-01-00:00:00 so... (3 Replies)
Discussion started by: kmanivan82
3 Replies

9. Shell Programming and Scripting

Please help me validate script

Hi Guys, Im a newbie to scripting and have a small assignment. can someone please confirm if the script i have written would work fine as we dont have a test server to test :( Scenario - copy 2 files from an ftp server (windows) to a linux machine (a perticular folder). run 2 different... (0 Replies)
Discussion started by: nishantvshah
0 Replies

10. UNIX for Dummies Questions & Answers

Validate numerical

friends that way I can validate that the value is numeric taken instance var = 12re if var = numeric then a echo "Numerical else echo "not mumerico" fi edit by bakunin: please use CODE-tags for code, data and terminal output (yourself). (9 Replies)
Discussion started by: tricampeon81
9 Replies
PHP_UNAME(3)								 1							      PHP_UNAME(3)

php_uname - Returns information about the operating system PHP is running on

SYNOPSIS
string php_uname ([string $mode = "a"]) DESCRIPTION
php_uname(3) returns a description of the operating system PHP is running on. This is the same string you see at the very top of the phpinfo(3) output. For the name of just the operating system, consider using the PHP_OS constant, but keep in mind this constant will con- tain the operating system PHP was built on. On some older UNIX platforms, it may not be able to determine the current OS information in which case it will revert to displaying the OS PHP was built on. This will only happen if your uname() library call either doesn't exist or doesn't work. PARAMETERS
o $mode -$mode is a single character that defines what information is returned: o 'a': This is the default. Contains all modes in the sequence "s n r v m". o 's': Operating system name. eg. FreeBSD. o 'n': Host name. eg. localhost.example.com. o 'r': Release name. eg. 5.1.2-RELEASE. o 'v': Version information. Varies a lot between operating systems. o 'm': Machine type. eg. i386. RETURN VALUES
Returns the description, as a string. EXAMPLES
Example #1 Some php_uname(3) examples <?php echo php_uname(); echo PHP_OS; /* Some possible outputs: Linux localhost 2.4.21-0.13mdk #1 Fri Mar 14 15:08:06 EST 2003 i686 Linux FreeBSD localhost 3.2-RELEASE #15: Mon Dec 17 08:46:02 GMT 2001 FreeBSD Windows NT XN1 5.1 build 2600 WINNT */ if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { echo 'This is a server using Windows!'; } else { echo 'This is a server not using Windows!'; } ?> There are also some related Predefined PHP constants that may come in handy, for example: Example #2 A few OS related constant examples <?php // *nix echo DIRECTORY_SEPARATOR; // / echo PHP_SHLIB_SUFFIX; // so echo PATH_SEPARATOR; // : // Win* echo DIRECTORY_SEPARATOR; // echo PHP_SHLIB_SUFFIX; // dll echo PATH_SEPARATOR; // ; ?> SEE ALSO
phpversion(3), php_sapi_name(3), phpinfo(3). PHP Documentation Group PHP_UNAME(3)
All times are GMT -4. The time now is 01:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy