Sponsored Content
Full Discussion: Script for Country Codes
Top Forums UNIX for Advanced & Expert Users Script for Country Codes Post 302181574 by zanetti321 on Thursday 3rd of April 2008 11:02:54 AM
Old 04-03-2008
Reply

Dear Unilover
this what i have typed for the faster code:

geo@spiserver /home/geo/cdr/ItalyRel 25 > awk "{$(sed 's=\(.*\) \(.*\)=if($4~/^\2/)print $0\" \1\"=' country-codes.txt)}" phonelines.txt|awk "{$(sed 's=\(.*\) \(.*\)=if($5~/^\2/)print $0\" \1\"=' country-codes.txt)}"
Variable syntax

and this is the files in my directory

134 Apr 3 16:56 country-codes.txt
-rw-r--r-- 1 geo geo 0 Apr 3 16:57 final
-rw-r--r-- 1 geo geo 874008 Mar 31 17:50 italy2
-rw-r--r-- 1 geo geo 1151226 Apr 3 17:11 phonelines.txt
-rwxr-xr-x 1 geo geo 133 Apr 3 17:09 script*
 

6 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Country Codes script faster response ;please help

Dear all I have group of input lines which look like this These input lines is placed in a file named phonelines.txt and there is a script which match $4 and $5 with country codes placed in another file named country-codes.txt and its contents is : Italy 39 Libyana 21892 Thuraya... (12 Replies)
Discussion started by: zanetti321
12 Replies

2. Shell Programming and Scripting

whois country help

Hello folks, I have list of ips like 1.1.1.1 2.2.2.2 3.3.3.3 4.4.4.4 whois 1.1.1.1 |grep -E 'country|Country' it show country=US or whatever. so i have number of ips in text file, how i can use above script to automate output like 1.1.1.1 US 2.2.2.2 CA 3.3.3.3 FR (3 Replies)
Discussion started by: learnbash
3 Replies

3. Shell Programming and Scripting

'watch' not interpreting escape codes in bash script

Hi there, I'm fairly new to bash scripting and already having some troubles. I'm making a script that can print some series of strings in colors based in the information of a file, for simplicity let's say it only does: #!/bin/bash printf "\eWhen you execute this in the command line it... (1 Reply)
Discussion started by: Arashi
1 Replies

4. Shell Programming and Scripting

Bash Shell Script Exit Codes

Here is my daily stupid question: How can I tell a script to only execute if the other scripts exits successfully? So "script A" executes and it executes successfully (0),then "script B" will run or else "script A "executes and it exits unsucessfully (1) then "script B" will read return... (6 Replies)
Discussion started by: metallica1973
6 Replies

5. Shell Programming and Scripting

ip 2 country sorting[solved]

Dear folks. I have list of ip address from different country, i would like check from script this ip address belong to which country, please suggest any command, i have more than 200 ip address so i need to do it via script. Script will show me country code and its City if possible? ... (0 Replies)
Discussion started by: learnbash
0 Replies

6. Forum Support Area for Unregistered Users & Account Problems

Registering from blocked country

Hi, I'm come from Vietnam and want to join to Unix forum just because I like Unix programming and want to learning more. My IP is allocate by DHCP server so it is dynamic. Here is my desired username and my email: Username: lucasdo Email: rennersstar@gmail.com Thank you very much for... (0 Replies)
Discussion started by: lucasdo
0 Replies
mkgeo_ugrid(1rheolef)						    rheolef-6.1 					     mkgeo_ugrid(1rheolef)

NAME
mkgeo_ugrid -- build an unstructured mesh of a parallelotope, in 1d, 2d or 3d SYNOPSIS
mkgeo_ugrid options [n] EXAMPLE
The following command build a triangle based 2d unstructured mesh of the unit square: mkgeo_ugrid -t 10 > square-10.geo geo -mayavi square-10.geo or in one comand line: mkgeo_ugrid -t 10 | geo -mayavi - DESCRIPTION
This command is usefull when testing programs on simple geometries. Invocation is similar to mkgeo_grid (see mkgeo_grid(1)). It calls gmsh as unstructured mesh generator. It avoid the preparation of an input file for a mesh generator. The optional n argument is an inte- ger that specifies the subdivision in each direction. By default n=10. The mesh files goes on standard output. The command supports all the possible element types: edges, triangles, rectangles, tetraedra, prisms and hexahedra. It supports also mixed 2D with triangles and quadrangles: mkgeo_ugrid -tq 10 | geo -mayavi - and mixed 3D with tetraedra, prisms and/or hjexaedra: mkgeo_ugrid -TP 10 | geo -mayavi - mkgeo_ugrid -PH 10 | geo -mayavi - mkgeo_ugrid -TPH 10 | geo -mayavi - ELEMENT TYPE OPTIONS
-e 1d mesh using edges. -t 2d mesh using triangles. -q 2d mesh using quadrangles. -tq 2d mesh using both triangles and quadrangles. -T 3d mesh using tetraedra. -P 3d mesh using prisms. -H 3d mesh using hexahedra. -TP -PH -TPH 3d mesh using a mixt between tetraedra, prisms and/or hexahedra. THE GEOMETRY
The geometry can be any [a,b] segment, [a,b]x[c,d] rectangle or [a,b]x[c,d]x[f,g] parallelotope. By default a=c=f=0 and b=d=g=1, thus, the unit boxes are considered. For instance, the following command meshes the [-2,2]x[-1.5, 1.5] rectangle: mkgeo_ugrid -t 10 -a -2 -b 2 -c -1.5 -d 1.5 | geo - -a float -b float -c float -d float -f float -g float BOUNDARY DOMAINS
-sides -nosides The boundary sides are representd by domains: left, right, top, bottom,front and back. -boundary -noboundary This option defines a domain named boundary that groups all sides. By default, both sides and the whole boundary are defined as domains: mkgeo_ugrid -t 10 > square.geo geo square.geo mkgeo_ugrid -t 10 -nosides > square.geo geo square.geo mkgeo_ugrid -t 10 -noboundary > square.geo geo square.geo mkgeo_ugrid -t 10 -noboundary -nosides > square.geo geo square.geo REGIONS
-region -noregion The whole domain is splitted into two subdomains: east and west, This option is used for testing computations with subdomains (e.g. transmission problem; see the user manual). mkgeo_ugrid -t 10 -region | geo - CORNERS
-corner -nocorner The corners (four in 2D and eight in 3D) are defined as OD-domains. This could be usefull for some special boundary conditions. mkgeo_ugrid -t 10 -corner | geo - mkgeo_ugrid -T 5 -corner | geo - THE MESH ORDER
-order int The polynomial approximation mesh order, as defined by gmsh. This option enable a possible curved boundary, when applying a suit- able nonlinear transformation to the mesh. Defualt is order=1. OTHERS OPTIONS
-clean clear temporary files (this is the default). -noclean does not clear temporary files. SEE ALSO
mkgeo_grid(1) rheolef-6.1 rheolef-6.1 mkgeo_ugrid(1rheolef)
All times are GMT -4. The time now is 01:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy