Hi There,
I have a script which finds for log files and removes them if the file has changed in the last day.
The script runs fine without errors. The log file is still there. So, I decided to print the find command and run the command outside the script. Getting "Incomplete statement"
Can you... (6 Replies)
I'm redirecting the output of a command to a logfile, however, if the user is on a terminal I would also like the output to be displayed on the screen.
tar tvf some_tarfile >Logfile
if the user is on a term then have the output to the Logfile and also be displayed on the screen at the same... (2 Replies)
Hi there
I have a script that runs but it outputs everything onto the screen instead of a file.
I've tried using the > outputfile.txt however all it does is dump the output to the screen and creates an outputfile.txt but doesn't put anything in that file.
Any help would be appreciated
... (6 Replies)
We have an application here that does some table queries and then prints the result on screen. I do not have the code of this application (which i will just call "queryCommand"), but what it does is that you call it with some parameters and it prints some info about the query and then the... (5 Replies)
Hello i am trying to write a script that will redirect the output to a certain file. Here is the code so far:
#!/bin/bash
ps -e | sort | more > psfile
When I execute the script nothing happens since i assume the output was redirected to the file called psfile. When I try to look at the... (1 Reply)
Hi Gurues,
I need to modify an existing script that uses find to search a folder, and then move its contents to a folder. What I need to do is run gzip on each file after it's moved.
So, I ran this little test:
Put a ls.tar file on my $HOME, mkdir tmp, and then:
virtuo@tnpmprd01: find .... (3 Replies)
Hi all
I was wondering if there was a slicker way of doing this without the file -
awk '{print $2}' FS=":" "${FILE}" > "${TMPFILE}"
{
read M_GRP_ID || m_fail 1 "Error: Read failed 1 (${FUNCNAME})"
read M_GRP_WAIT || m_fail 1 "Error: Read failed 2 (${FUNCNAME})"
}... (6 Replies)
Hi all,
i have been trying to direct o/p of one command to file, but i don get any entries in file but ouptput get displayed on command prompt.
I have tried many options but still , it does not work.
please guide.
here is the command
-bash-3.00$ /usr/local/bin/sudo lpstat -p | grep... (2 Replies)
Example script:
find mydir -type f -exec echo {}>aaa \; -exec echo {}>bbb \;The two paths go the the bbb file, while there should be one of them on each file. How should I do it to get it working? (2 Replies)
Hello,
I am running a shell script on AIX 6.1. The script calls ksh to run. ksh is also the login shell for the account under which I am running this script, but for convenience I always change to the bash shell via "exec bash" after I "su" to the account.
The script redirects stdout and... (4 Replies)
Discussion started by: Clovis_Sangrail
4 Replies
LEARN ABOUT DEBIAN
geoip
geoip(3) Version 0.2 geoip(3)NAME
geoip - A Tcl extension for geographic or organisational lookup of IP addresses and hostnames.
SYNOPSIS
geoip open [-type TYPE ] [-flags FLAG ]
geoip open [-file PATH ] [-flags FLAG ]
geoip [COMMAND]
geoip [QUERY] arg1
DESCRIPTION
This Tcl extension encapsulates most of GeoIP C API functions into tcl commands.
OPEN OPTIONS
open takes either a file path and a set of flags, or a type and a set of flags. Supported types and flags are described below.
TYPE Looks under the standard installation share directory, eg /usr/local/share/GeoIP/ for a GeoIP database according to type.
PATH Absolute/relative path to GeoIP database.
FLAG Flags seperated by ':', eg memory_cache:memory_check
COMMAND
Individual singular commands can be one of:
close Close the currently open database.
db_info
Get information about the current database.
db_edition
Returns edition of opened database.
db_avail
Test the availability of databases in your system in known locations. e.g db_avail country_edition
QUERY
Commands that query the database. All commands return N/A if a result cannot be found. If none already open, a command will attempt to open
a suitable database. country commands will open a country_edition database. region commands will open a region_edition_rev1 one. name com-
mands will open an org_edition one, and the record_edition will open a city_edition_rev1 database. The commands are:
country_code_by_addr
Takes an IP address and returns the ISO-3166-1 Alpha-2 code of the country.
country_code3_by_addr
Takes an IP address and returns the ISO-3166-1 Alpha-3 code the country.
country_code_by_name
Takes a hostname and returns the ISO-3166-1 Alpha-2 code the country.
country_code3_by_name
Takes a hostname and returns the ISO-3166-1 Alpha-3 code the country.
country_name_by_addr
Takes an IP address and returns the country name.
country_name_by_name
Takes a hostname and returns the country name.
name_by_addr
Takes an IP address and returns the organisation name (or ISP/ASnum according to the opened database)
name_by_name
Takes a hostname and returns the organisation name.
region_by_addr
Takes an IP address and returns these region attributes as in an associative array: country, region
region_by_name
Takes a hostname and returns the region attributes.
record_by_addr
Takes an IP address and returns these record attributes as in an associative array: code, code3, region, country, city, postcode,
latitude, longitude, dma(dma code), and area (area code)
record_by_name
Takes a hostname and returns the record attributes.
TYPES
Relevant types of databases are: country_edition, org_edition, isp_edition, city_edition_rev1, region_edition_rev1, geoip_asnum_edition.
"open -type" will accept their unambiguous abbreviations.
FLAGS
Valid flags are: standard, memory_cache, check_cache, index_cache.
FILES
./share/GeoIP.dat
GeoIP country_edition database.
./share/GeoIPOrg.dat
GeoIP org_edition database.
./share/GeoIPCity.dat
GeoIP region_city_rev1 database.
./share/GeoIPRegion.dat
GeoIP region_edition_rev1 database.
./share/GeoIPASNum.dat
GeoIP asnum_edition database.
BUGS
Please report to author.
AUTHOR
Djihed Afifi <djihed@gmail.com>.
SEE ALSO
GeoIP C API documentation <www.maxmind.com>
Tcl extension April 2007 geoip(3)