I am able to type blank space and write everything into the client.
However one last problem.
When the user enter a country lets say China, It will returned everything I write but the terminal just hanged there and I can't type anything even there is a loop to ask user enter again.
I know there is something on at the readOutput function but I dunno where it go wrong
User enter input in the client and readOutput will show what the server has wrote
Client side
function readOutput in client
function readLine in client side
I'm writing a bash shell script to backup several mysql databases. This script will run on a daily basis and send a copy to a remote FTP repository. The filenames are in the format DATE.backup.sql. How do I store the DATE variable so I can delete/move/etc the file on the FTP server the next time... (4 Replies)
how would i go about storing this command in a variable
echo "$LINE" | awk -F"|" '{print $1"|"$2"|"$3"}'
i have tried FOO = ${command up there} but receive the error FOO: not found
aswell as a couple of other attempt but no luck (2 Replies)
Hi Everyone,
I have a code which requires to be stored in different variables and I am achiving it like this.
HOST=`echo $RMP | cut -f2 -d:`
NAME=`echo $RMP | cut -f3 -d:`
DIR=`echo $RMP | cut -f4 -d:`
TYPE=`echo $RMP | cut -f5 -d:`
Is there any other way of storing value... (2 Replies)
Hi all,
I m new to this forum.
I ma facing onei issue.
I have something like this:
length= wc -l < b2| awk '{print $1}'
where b2 is filename having detauls like:
cat b2
abc1
abc4
xyc3
sbdghf4
but when I do echo "$length" it displays nothing
Also I am using awk to overcome... (4 Replies)
Hi,
I need to figure out a way to to capture the contents of a field that is separated by a pipe sign.
Example Data:
-100F| some other description
-10C| some description
| some description
As you can see, the length of the field on the left of the pipe can be any length and... (3 Replies)
Hi,
I have a ftp script there I want to store the o/p of the below command:
sftp -b <batch file> user@password
cat <batch file>
get /remote/file/path/remote_file_name.csv*.gz /local/path
Now the problem is that when I fire this command. Then it gives o/p as:
File... (7 Replies)
Hi,
ps -ef|awk '{print $2}'
i want to store the result of the above command in a variable.
I never worked with arrays in shell scripting.
i tried the below code:
set a=`ps -ef|awk '{print $2}'`
But echo $a returns null.
I want to store the content in a variable and retrieve it... (2 Replies)
My script below seems to be choking because I need the the output of the find command to be stored as a variable that can then be called by used lower in the script.
#!/bin/bash
cd "/resumes_to_be_completed"
var1=find . -mmin -1 -type f \( -name "*.doc" -o -name "*.docx" \)... (1 Reply)
I have a below syntax its working fine...
var12=$(ps -ef | grep apache | awk '{print $2,$4}')
Im getting expected output as below:
printf "%b\n" "${VAR12}"
dell 123
dell 456
dell 457
Now I wrote a while loop.. the output of VAR12 should be passed as input parameters to while loop and results... (5 Replies)
Discussion started by: sam@sam
5 Replies
LEARN ABOUT PHP
datetimezone.listidentifiers
DATETIMEZONE.LISTIDENTIFIERS(3) 1 DATETIMEZONE.LISTIDENTIFIERS(3)DateTimeZone::listIdentifiers - Returns a numerically indexed array containing all defined timezone identifiers
Object oriented style
SYNOPSIS
publicstatic array DateTimeZone::listIdentifiers NULL ([int $what = DateTimeZone::ALL], [string $country])
DESCRIPTION
Procedural style
array timezone_identifiers_list NULL ([int $what = DateTimeZone::ALL], [string $country])
PARAMETERS
o $what
- One of DateTimeZone class constants.
o $country
- A two-letter ISO 3166-1 compatible country code.
Note
This option is only used when $what is set to DateTimeZone::PER_COUNTRY.
RETURN VALUES
Returns array on success or FALSE on failure.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.0 | |
| | |
| | Added the optional $what and $country parame- |
| | ters. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
A timezone_identifiers_list(3) example
<?php
$timezone_identifiers = DateTimeZone::listIdentifiers();
for ($i=0; $i < 5; $i++) {
echo "$timezone_identifiers[$i]
";
}
?>
The above example will output something similar to:
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
SEE ALSO timezone_abbreviations_list(3).
PHP Documentation Group DATETIMEZONE.LISTIDENTIFIERS(3)