Hello there,
I wrote a shell script to modify the code for some of our clients in our client database. Before starting the data modification the program performs a few checks.
When a check is being performed, it should be shown on the screen of the user running the program, the result of... (5 Replies)
How to write multiple echo statements in unix?
echo "************************************************************************************************************";
echo This Script do the following functions
echo 1. Point 1
echo 2. Point 2
echo 3. Point 3
echo... (2 Replies)
Please help me. I have been doing this for several hours.
Here is the code
if then
echo a b c d >> file.txt
echo 1111 >> file.txt
fi
The reason I want the two echo is because I want these statements printed on multiple lines. I keep getting error .
First it tells me... (2 Replies)
Hi All,
I need to check for 3 conditions and if all the 3 are not satified need to say that services are not running....
is the below code correct.
#********** Check to see if Service 1 is still running**************
if
then
echo "$datetimestamp: Service1 is not running" >>... (4 Replies)
hi,
I have some problems in my simple script about the redirect echo stdout command inside a condition. Why is the echo command inside the elif still execute in the else command
Here are my simple script
After check on the two diff output the echo stdout redirect is present in two diff... (3 Replies)
I'm working on a script for class as a final project. We have to ask for values (city, state, zip) five times, but the state can only be MI, IN, IL, or OH. I'm trying to do this with a while loop inside of a while loop, but I have no idea how to do it properly.
Here's what I have so far:
... (3 Replies)
if
then
echo "Entry Valid : ${x_oug}"
else
echo "Entry Invalid : " 0
fi
In the above code the 3rd line is not working... it does not print anything
I tried following as well .. but no luck!
echo "Entry Valid : ... (13 Replies)
I had the below sftp script working perfectly but the problem is I am not able to send the echo statements .
#!/bin/sh
echo "Starting to sftp..."
sftp admin@myip << END_SCRIPT
cd /remotepath/
lcd /localpath/
mget myfiles*.csv
bye
END_SCRIPT
echo "Sftp successfully."
echo
echo... (11 Replies)
exmaple:
file1 and file2 has 1 bit
if
then
exit
else
send out email
fi
if
then
exit
else
send out email
fi
it exits the 1st if. did not continue with my 2nd if. thanks in advanced.
Please use CODE tags are suggested on every page when you post an item in... (7 Replies)
Hello,
I am new to scripting and I am trying to write a simple script that creates users and adds their passwords from two files; one a user list file and another a password list file.
For example, I have two files already.
$ cat file1
andy
stephane
aby
paul
$ cat file2
123
234... (4 Replies)
Discussion started by: FemoTheDon
4 Replies
LEARN ABOUT PHP
datetime.gettimestamp
DATETIME.GETTIMESTAMP(3) 1 DATETIME.GETTIMESTAMP(3)DateTime::getTimestamp - Gets the Unix timestamp
Object oriented style
SYNOPSIS
public int DateTime::getTimestamp (void )
DESCRIPTION
int DateTimeImmutable::getTimestamp (void ) int DateTimeInterface::getTimestamp (void )
Procedural style
int date_timestamp_get (DateTimeInterface $object)
Gets the Unix timestamp.
PARAMETERS
This function has no parameters.
RETURN VALUES
Returns the Unix timestamp representing the date.
EXAMPLES
Example #1
DateTime.getTimestamp(3) example
Object oriented style
<?php
$date = new DateTime();
echo $date->getTimestamp();
?>
Procedural style
<?php
$date = date_create();
echo date_timestamp_get($date);
?>
The above examples will output something similar to:
1272509157
NOTES
Using U as the parameter to DateTime.format(3) is an alternative when using PHP 5.2.
SEE ALSO DateTime.setTimestamp(3), DateTime.format(3).
PHP Documentation Group DATETIME.GETTIMESTAMP(3)