I wonder if the script below is possible to write somehow more efficiently. It seems to me the problem is very common..
CreateFolders() # parameter: name of file with relative path with regard to directory $project_root
{
echo $1 | awk '{ n=split($1, array, "/");
... (2 Replies)
Good morning,
Can someone help to color a figure in columns if its exceeding a threshold using shell script .
ex. I have file contains 5 columns showing a value in % I need to show the value in red if it exceed 90 %
Appreciate your help (3 Replies)
Hi
#Testing for file existence
if ; then
echo 'SCHOOL data is available for processing'
else
echo 'SCHOOL DATA IS NOT AVAILABLE FOR PROCESSING'
:
i wrote a script, where it begins by checking if file exists or not.
If it exists, it truncates the database... (2 Replies)
I am trying to find case insensitive file names and then replace that particular file with other name.
if
then
ls | grep -i "update" | xargs -I {} mv {} LineItems.csv
echo "File moved from *update*"
elif
then
ls | grep -i "priority" | xargs -I {} mv {} ... (1 Reply)
Hello,
I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
i have make file which i try to make them generic
but it keeps to compline it missing include directory
this is the makefile :
CXX=g++
CPPFAGS= -Wall -O0 -g -std=c++14
INCLUDES = -I/home/vagrant/libuv/include -Isrc
LIBS_DIRS = -L/home/vagrant/libuv/build
LDFLAGS=... (7 Replies)
Discussion started by: umen
7 Replies
LEARN ABOUT PHP
geoip_country_name_by_name
GEOIP_COUNTRY_NAME_BY_NAME(3) 1 GEOIP_COUNTRY_NAME_BY_NAME(3)geoip_country_name_by_name - Get the full country nameSYNOPSIS
string geoip_country_name_by_name (string $hostname)
DESCRIPTION
The geoip_country_name_by_name(3) function will return the full country name corresponding to a hostname or an IP address.
PARAMETERS
o $hostname
- The hostname or IP address whose location is to be looked-up.
RETURN VALUES
Returns the country name on success, or FALSE if the address cannot be found in the database.
EXAMPLES
Example #1
A geoip_country_name_by_name(3) example
This will print where the host example.com is located.
<?php
$country = geoip_country_name_by_name('www.example.com');
if ($country) {
echo 'This host is located in: ' . $country;
}
?>
The above example will output:
This host is located in: United States
SEE ALSO geoip_country_code_by_name(3), geoip_country_code3_by_name(3).
PHP Documentation Group GEOIP_COUNTRY_NAME_BY_NAME(3)