Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Test command - Two square brackets Post 302375287 by Shan_u2005 on Friday 27th of November 2009 06:39:26 AM
Old 11-27-2009
Thanks all
Shantanu
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

square brackets

I would like to substitute a phrase which contains square brackets. change TO how? Thanks (2 Replies)
Discussion started by: gilead29
2 Replies

2. Shell Programming and Scripting

WHy the double square brackets?

One of the senior administrators gave me a shell script to modify and it begins as follows: if ] && ] {more code follows} Why the double square brackets? (10 Replies)
Discussion started by: mojoman
10 Replies

3. Shell Programming and Scripting

Use of double square brackets in ksh

Hi First apologies if this has been raised before. I've got the following in a ksh script: if ] For some reason this does not work. But if I remove the double square brackets to: if This works. I thought ksh supported the ]. Or is there more to it? Thanks in advance. (3 Replies)
Discussion started by: tsu3000
3 Replies

4. Shell Programming and Scripting

Double square brackets question

Hi, I just came across an interesting shell script syntax like the one below: ] && (trap 'rm -rf ${WORK_DIR}/*.$$; echo "\n\nInterrupted !!\n\n"; exit 4' 1 2 3 15) Can someone please explain the code snippet above? The trap command bit is fine but ] && is the hazy part. Generally we use an... (2 Replies)
Discussion started by: King Nothing
2 Replies

5. Shell Programming and Scripting

Replacing text between two square brackets

hi guys, i'm writing a script that looks for a unquie id in a file and replaces a string between two square brackets on the same line as the unquie id: ....... ....... 0001 zz 43242 replace this text] name 0002 sd 65466 UK] country ....... ....... how can i find line with id 0001... (6 Replies)
Discussion started by: zaff
6 Replies

6. Shell Programming and Scripting

Delete text between square brackets and also delete those square brackets using sed or awk

Hi All, I have a text file which looks like this: computer programming systems engineering I want to get rid of these square brackets and also the text that is inside these brackets. So that my final text file looks like this: computer programming systems engineering I am using... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies

7. UNIX for Dummies Questions & Answers

Single or double square brackets

Hi frieds, I don't understand the difference between single square bracket and double square brackets in a IF condition. Ex. if ; then RETURNJOB=1 else RETURNJOB=0 fi It run, but this if ]; then RETURNJOB=1 else RETURNJOB=0 fi (4 Replies)
Discussion started by: dogshort
4 Replies

8. Shell Programming and Scripting

Compare the value in between square brackets in file

I wanted to compare the value inside the Squre bracket after Colon ( : ) based on any value(seperated by or operator | ) inside the variable Thread and if match found then wnated to store in output file Input file : 20140320 00:08:43.918 INO 35] - Corporate hub is 20140320 00:08:43.918... (2 Replies)
Discussion started by: nes
2 Replies

9. Shell Programming and Scripting

Grep number between Square [] brackets

I wanted to store the number inside the square bracket between colon( : ) and closing suqre bracket(]) in some variable. Suppose I have lines like : Input file : 20140320 00:08:23.846 INFO 84] - anything in line 20140320 00:08:23.846 Test 589] - Virtual and lab lab anything... (18 Replies)
Discussion started by: nes
18 Replies

10. Shell Programming and Scripting

IF statement with square brackets

Hi All, Hope you all are doing good. Yesterday in my project i came across a scenario which i can not guess why it was working in one region and why it was not in another region. Please find my issue below. I am using AIX version 6.0 of UNIX in my project, in shell scripting i have the... (1 Reply)
Discussion started by: mad man
1 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 12:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy