Sponsored Content
Full Discussion: script don't stop
Top Forums Shell Programming and Scripting script don't stop Post 302245819 by larne on Saturday 11th of October 2008 07:12:21 AM
Old 10-11-2008
script don't stop

Hello everybody!
I am new to this and I am trying to change a script in an open source program that plots some offset vectors and then calls a postscript viewer. I have commented away the call for the postscript viewer but somehow the script doesn't return to the shell prompt. I cant figure out why. It is not a big problem since the script will continue if there are more "calls" in the script, but why is it "waiting"?
any ideas?

Code:
### Add the window numbers (last overlay, no -K (close plot system)).
#pstext: (x, y,  size(pts), angle(ccw),  fontno,  justify,  text)
set GMTFLAGS = "-O -N -G0/0/0 $GENOPT $RANGE $SIZE"
echo "   Calling:   pstext $GMTFLAGS >> $PSFILE"
#green, 14pts, RightTop BottomLeft
$AWK '{printf "%.1f %.1f 10 0 0 RT %s\n", $2, $3, $1}' $TMPFILE | pstext $GMTFLAGS >> $PSFILE

# commented away 081011
# # calls from Doris, cannot interactive...
# #%// BK 19-Jul-2000
# echo "   Calling:   viewanddel"
# rm -f $TMPFILE $GRDFILE $CPTFILE
# viewanddel $PSFILE

# ### EOF

exit 0 # added 081011

 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

I don't think this would be a problem to script but ...

:confused: I have not written any code in about 15 years. The company I work for has Unix servers and they utilize KSH. The scriptors say that what I want can only be scripted in PERL which on my server they say they cannot get to work. They also tell me that what I want done cannot be... (0 Replies)
Discussion started by: CapnJuan
0 Replies

2. Shell Programming and Scripting

don't know how to implentment as unix sh script

for each file if file name like xx* for each line in a file if substring(3,6) found in another txt file output to file-a( filename = orginal file + _a) else output to file-b( filename = orginal file + _a) end Next Line (4 Replies)
Discussion started by: ttivanwan@yahoo
4 Replies

3. UNIX for Advanced & Expert Users

don't understand the unix script

if {"$my_ext_type" = MAIN]; then cd $v_sc_dir Filex.SH $v_so_dir\/$v_fr_file Can somebody tell me what does this suggest. I am pretty new to unix and I am getting confused. What i understood from here is If we have a file extension name as MAIN which we have then we change the directory to... (1 Reply)
Discussion started by: pochaman
1 Replies

4. Shell Programming and Scripting

How to stop a script running in remote server from local script

Hi, I have googled for quite some time and couldn't able to get what exactly I am looking for.. My query is "how to stop a shell script which is running inside a remote server, using a script"??? can any one give some suggestions to sort this out. (1 Reply)
Discussion started by: mannepalli
1 Replies

5. Shell Programming and Scripting

Stop child script by stoping parent script

Hi everyone, I have this problem with a script I'm writting. I want to execute a code running in the background several times through a script. I am writting it like that parent_script for a in 1 2 3 4 5 do exec test -n $a done What I want to do is when parent_script is killed,... (0 Replies)
Discussion started by: geovas
0 Replies

6. Shell Programming and Scripting

Why don't kill the script after 5s?

# watchdog process mainpid=$$ (sleep 5; kill $mainpid) & watchdogpid=$! sleep 100 kill $watchdogpid The sleep isn't be killed, I want the script to be killed ---------- Post updated at 03:03 AM ---------- Previous update was at 12:04 AM ---------- I just modify the format of my... (1 Reply)
Discussion started by: yanglei_fage
1 Replies

7. UNIX for Dummies Questions & Answers

Revision of script from don

Don, I revised script but when I ran it I did not receive any log. I am not sure what you mean to run it in code tags. I am using a putty session and ssh but I did not get a trace log? Barb ---------- Post updated at 01:33 PM ---------- Previous update was at 01:27 PM... (2 Replies)
Discussion started by: bcarosi
2 Replies

8. Shell Programming and Scripting

A shell script to run a script which don't get terminated and send a pattern from the output by mail

Hi Guys, I am very new to shell script and I need your help here to write a script. Actually, I have a script abc.sh which don't get terminated itself. So I need to design a script to run this script, save the output to a file, search for a given string in the output and if it exists send those... (11 Replies)
Discussion started by: Sambit Sahu
11 Replies
PSTEXT(l)																 PSTEXT(l)

NAME
pstext - To plot text on maps SYNOPSIS
pstext textfile -Jparameters -Rwest/east/south/north[r] [ -Btickinfo ] [ -Cdx/dy ] -D[j]dx/dy[v[red/green/blue] ] [ -Eazimuth/elevation ] [ -Gred/green/blue ] [ -H[nrec] ] [ -K ] [ -L ] [ -M[flag] ] [ -N ] [ -O ] [ -P ] [ -Spen ] [ -U[/dx/dy/][label] ] [ -V ] [ -W[red/green/blue][o|O|c|C[pen]] ] [ -Xx-shift ] [ -Yy-shift ] [ -Zzlevel ] [ -ccopies ] [ -: ] DESCRIPTION
pstext plots textstrings of variable size, font type, and orientation. Various map projections are provided, with the option to draw and annotate the map boundaries. PostScript code is written to standard output. Greek characters, subscript, superscript, and small caps are supported as follows: The sequence @~ toggles between the selected font and Greek (Symbol). @%no% sets the font to no; @%% resets the font to the starting font, @- toggles subscripts on/off, @+ toggles superscript on/off, and @# toggles small caps on/off. @@ prints the @ sign. @e, @o, @a, @E, @O, @A give the accented Scandinavian characters. Composite characters (overstrike) may be indicated with the @!<char1><char2> sequence, which will print the two characters on top of each other. To learn the octal codes for symbols not available on the keyboard and some accented European characters, see Section 4.16 and Appendix F in the GMT Technical Reference and Cookbook. Note that WANT_EURO_FONT must be set to TRUE in your .gmtdefaults file in order to use the accented characters. Using the -W option, a colored rec- tangle underlying the text may be plotted (Does not work for strings with sub/super scripts, symbols, or composite characters, except in paragraph mode (-M)). textfile This file contains 1 or more records with (x, y, size, angle, fontno, justify, text). If no file is given, pstext will read stan- dard input. size is text size in points, angle is measured in degrees counter-clockwise from horizontal, fontno sets the font type, justify sets the alignment. If fontno is not an integer, then it is taken to be a textstring with the desired fontname. See the gmtdefaults man page for names and numbers of avaiable fonts (or run pstext -L). The alignment refers to the part of the textstring that will be mapped onto the (x,y) point. Choose a 2 character combination of L, C, R (for left, center, or right) and T, M, B for top, middle, or bottom. e.g., BL for lower left. -J Selects the map projection. Scale is UNIT/degree, 1:xxxxx, or width in UNIT (upper case modifier). UNIT is cm, inch, or m, depend- ing on the MEASURE_UNIT setting in .gmtdefaults, but this can be overridden on the command line by appending the c, i, or m to the scale/width value. CYLINDRICAL PROJECTIONS: -Jclon0/lat0/scale (Cassini) -Jjlon0/scale (Miller) -Jmscale (Mercator - Greenwich and Equator as origin) -Jmlon0/lat0/scale (Mercator - Give meridian and standard parallel) -Joalon0/lat0/azimuth/scale (Oblique Mercator - point and azimuth) -Joblon0/lat0/lon1/lat1/scale (Oblique Mercator - two points) -Joclon0/lat0/lonp/latp/scale (Oblique Mercator - point and pole) -Jqlon0/scale (Equidistant Cylindrical Projection (Plate Carree)) -Jtlon0/scale (TM - Transverse Mercator, with Equator as y = 0) -Jtlon0/lat0/scale (TM - Transverse Mercator, set origin) -Juzone/scale (UTM - Universal Transverse Mercator) -Jylon0/lats/scale (Basic Cylindrical Projection) AZIMUTHAL PROJECTIONS: -Jalon0/lat0/scale (Lambert). -Jelon0/lat0/scale (Equidistant). -Jflon0/lat0/horizon/scale (Gnomonic). -Jglon0/lat0/scale (Orthographic). -Jslon0/lat0/[slat/]scale (General Stereographic) CONIC PROJECTIONS: -Jblon0/lat0/lat1/lat2/scale (Albers) -Jdlon0/lat0/lat1/lat2/scale (Equidistant) -Jllon0/lat0/lat1/lat2/scale (Lambert) MISCELLANEOUS PROJECTIONS: -Jhlon0/scale (Hammer) -Jilon0/scale (Sinusoidal) -Jk[f|s]lon0/scale (Eckert IV (f) and VI (s)) -Jnlon0/scale (Robinson) -Jrlon0/scale (Winkel Tripel) -Jvlon0/scale (Van der Grinten) -Jwlon0/scale (Mollweide) NON-GEOGRAPHICAL PROJECTIONS: -Jp[a]scale[/origin] (polar (theta,r) coordinates, optional a for azimuths and offset theta [0]) -Jxx-scale[l|ppow][/y-scale[l|ppow]] (Linear, log, and power scaling) More details can be found in the psbasemap manpages. -Jz Sets the vertical scaling (for 3-D maps). Same syntax as -Jx. -R west, east, south, and north specify the Region of interest. To specify boundaries in degrees and minutes [and seconds], use the dd:mm[:ss] format. Append r if lower left and upper right map coordinates are given instead of wesn. OPTIONS
No space between the option flag and the associated arguments. -B Sets map boundary tickmark intervals. See psbasemap for details. -C Sets the clearance between the text and the surrounding box [0.15c/0.15c (or 0.05i/0.05i)]. Only used if -W is specified. -D Offsets the text from the projected (x,y) point by dx,dy [0/0]. Use -Dj to offset the text away from the point instead (i.e. the text's justification' will determine the direction of the shift). In paragraph mode (-M), one may append v which will draw a line from the original point to the shifted point. Optionally append a pen for this line. -E Sets the viewpoint's azimuth and elevation (for perspective view) [180/90].' (Not implemented for paragraph mode). -G Sets the gray-shade (0-255) or color (r/g/b, each 0-255) used for drawing the text. [Default is black] -H Input file(s) has Header record(s). Number of header records can be changed by editing your .gmtdefaults file. If used, GMT default is 1 header record. -K More PostScript code will be appended later [Default terminates the plot system]. -L Lists the font-numbers and font-names available, then exits. -M Paragraph mode. Files must be multiple segment files. Segments are separated by a special record whose first character must be flag [Default is '>']. Starting in the 3rd column, we expect to find information pertaining to the typesetting of a text paragraph (the remaining lines until next segment header). The information expected is (x y size angle fontno justify linespace parwidth parjust), where x y size angle fontno justify are defined above, while linespace and parwidth are the linespacing and paragraph width, respec- tively. The justification of the text paragraph is governed by parjust which may be l(eft), c(enter), r(ight), or j(ustified). The segment header is followed by one or more lines with paragraph text. Text may contain the escape sequences discussed above as well as three more: @;r/g/b; changes the font color (@;; resets it), @:size: changes the font size (@:: resets it), and @_ toggles under- line on/off. Separate paragraphs with a blank line. -N Do NOT clip text at map boundaries [Default will clip]. -bo Selects binary output. Append s for single precision [Default is double]. -P Selects Portrait plotting mode [GMT Default is Landscape, see gmtdefaults to change this]. -S Draw text outline. Append pen attributes. (Not implemented for paragraph mode). -U Draw Unix System time stamp on plot. User may specify where the lower left corner of the stamp should fall on the page relative to lower left corner of plot. Optionally, append a label, or c (which will plot the command string.). The GMT parameters UNIX_TIME and UNIX_TIME_POS can affect the appearance; see the gmtdefaults man page for details. -V Selects verbose mode, which will send progress reports to stderr [Default runs "silently"]. -W Paint a rectangle beneath the text string. Set color [Default is no fill]. Append o to draw rectangle outline, add a pen to specify pen attributes [1/0/0/0]. Choose upper case O to get a rounded rectangle (only in paragraph mode). Choose lower case c to get a concave rectangle (only in paragraph mode). Choose upper case C to get a convex rectangle (only in paragraph mode). -X -Y Shift origin of plot by (x-shift,y-shift). Prepend a for absolute coordinates; the default (r) will reset plot origin. -Z For 3-D projections: Sets the z-level of the basemap [0]. (Not implemented for paragraph mode). -: Toggles between (longitude,latitude) and (latitude,longitude) input/output. [Default is (longitude,latitude)]. Applies to geo- graphic coordinates only. -c Specifies the number of plot copies. [Default is 1] EXAMPLES
To plot the outlines of the textstrings stored in the file text.d on a Mercator plot with the given specifications, try pstext text.d -R-30/30/-10/20 -Jm0.1i -P -B5 -S0.5p > plot.ps To add a typeset figure caption for a 3-inch wide illustration, try pstext -R0/3/0/5 -JX3i -O -H -M -N << EOF >> figure.ps This is an optional header record > 0 -0.5 12 0 4 LT 13p 3i j @%5%Figure 1.@%% This illustration shows nothing useful, but it still needs a figure caption. Highlighted in @;255/0/0;red@;; you can see the locations of cities where it is @_impossible@_ to get any good Thai food; these are to be avoided. EOF BUGS
Except for paragraph mode, the horizontal justification of surrounding rectangles does not work when Greek symbols, sub- and superscripts, and/or composite characters are imbedded in the textstring. In paragraph mode, the presence of composite characters and other escape sequences may lead to unfortunate word splitting. Finally, the outline option does not work with the escape sequences. The -N option does not adjust the BoundingBox information so you may have to post-process the PostScript outout with epstool or ps2epsi to obtain a correct BoundingBox. SEE ALSO
gmt(1gmt), psbasemap(1gmt) 1 Jan 2004 PSTEXT(l)
All times are GMT -4. The time now is 11:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy