Sponsored Content
Full Discussion: For loop scripting
Top Forums Shell Programming and Scripting For loop scripting Post 302582866 by ida1215 on Monday 19th of December 2011 12:15:14 AM
Old 12-19-2011
hi thanks for the reply. If i want to save the output file to individual file name from your code, how will i do that? I think i can start from it. this is my messy code supposedly:

Code:
#!/bin/bash

files="$(ls *.hdf)"

for f in $files; do
   for line in location.dat; do
      grdimage $f $range -Csst.cpt -JM$scale -P -B10g5 -K -O >> "$f".ps (this will produce an image map for each month)
      psxy $line $range -JM$scale -B10g5 -Sc0.05 -Gblack -P -K -O "$f".ps (this will plot location points on the output image from earlier command-
this is where i need to tell the program that it will only plot location points from the list for the given month)
    done 
done

thanks much.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

new to shell scripting: whats wrong with my if loop

#!/bin/bash for file in $HOME/*; do if ; then rm -i $file > /dev/null echo "$?" echo "$file has been deleted" fi done Been trying to learn shell scripting for a week or so now, when i run the script it doesnt display an error message, seems like it runs fine, however it doesnt delete... (10 Replies)
Discussion started by: stride6
10 Replies

2. Solaris

Problem in for loop of shell scripting in solaris

Hi below is my script for((i=0;i<=$TOTAL;i++)) do echo "IP's created are $s1.$s2.$s3.$s4" s4=`expr $s4 + 1` done where s1,2,3,4 are input varibles below error occurs while running the script syntax error at lin 11: '(' unexpected ... (12 Replies)
Discussion started by: krevathi1912
12 Replies

3. UNIX for Dummies Questions & Answers

Loop till you find a string in a fine <-- Need Help New to Unix Scripting

Guys - I am new to Unix scripting and am in need for a script that does the following. I have bits and pieces created and tested but i am just having a little difficult time getting it all together. - Loop through till it finds a string in a specific file. Any help is greatly appreciated. ... (1 Reply)
Discussion started by: mrehman
1 Replies

4. Shell Programming and Scripting

while loop in shell scripting

Hi, I have a doubt in usage of while loop in Shell script as Iam new to this. My requirement is that,I have two different directories containing some files which move files to other folder after parsing is done. In my script i wanted to add a while loop which checks for the count in these two... (5 Replies)
Discussion started by: jyothi_wipro
5 Replies

5. Shell Programming and Scripting

Clarification on if loop in Shell scripting

Hi, I'm using Ksh and I'm seeing some of code in my programme as given below. Could you please let me know whats is this meeaing ? (I'm new to this unix) grep "1034" /u/kkk/bin/temp5.lst|cut -c1-2 >/u/kkk/bin/temp6.lst if then echo "" ... (2 Replies)
Discussion started by: shyamu544
2 Replies

6. Shell Programming and Scripting

while loop shell scripting help

hi i was wondering if someone can help me with a while loop..i have been looking at this for hours and dont no wut to do.. i have to make a menu style.. to have a beeter understanding i have linked a photo at the bottom... http://www.mypicx.com/uploadimg/772204432_08022011_1.pngand then ... (1 Reply)
Discussion started by: beerpong1
1 Replies

7. Homework & Coursework Questions

shell scripting while loop lab 15 help

hi.. this is shell scripting lab15.sh i dont understand this lab i am at the screen shot part. i was wondering if someone can take a quick look at this lab i have linked the doc below. i dont know where to start i have did the Required Errorlevels Errorlevel # but dont... (1 Reply)
Discussion started by: beerpong1
1 Replies

8. Shell Programming and Scripting

Expect Scripting Loop Argument Desperately Needed!

I am trying to create an Expect script that does the following: 1) Telnets to an IP address and logs in with user ID and Password 2) Issue a CLI command to the server that will output data of which I am particularly interested in a DS1 clock 'Slips' value. I want to be able to keep issuing... (0 Replies)
Discussion started by: dwightlaidler
0 Replies

9. Shell Programming and Scripting

How to get the for loop output from a remote server in UNIX shell scripting?

Hi, I am using ksh , when i try to use for loop i am getting the expected output. $for variable in $(ps -fu user | grep -i something/ | grep -i something | grep -v grep | awk '{print $2}');do > grep $variable /tmp/some_path/*/* > done when tried the below to remote server, getting... (4 Replies)
Discussion started by: karthikram
4 Replies

10. UNIX for Dummies Questions & Answers

Scripting Question (For Loop)

Hello, I am practicing creating loops in bash scripting. I am trying to understand the different uses of the for loop. I have a script I made below with some help. #/bin/bash #This script will take the extension of a file in ls command and echo a certain statement based on what type of... (6 Replies)
Discussion started by: shah9250
6 Replies
Geo::GoogleEarth::Pluggable::Plugin::Default(3pm)	User Contributed Perl Documentation	 Geo::GoogleEarth::Pluggable::Plugin::Default(3pm)

NAME
Geo::GoogleEarth::Pluggable::Plugin::Default - Geo::GoogleEarth::Pluggable Default Plugin Methods METHODS
Methods in this package are AUTOLOADed into the Geo::GoogleEarth::Pluggable::Folder namespace at runtime. CONVENTIONS
Plugin Naming Convention: Geo::GoogleEarth::Pluggable::Plugin::CPANID (e.g. "MRDVT") Object Naming Convention: Geo::GoogleEarth::Pluggable::Contrib::"$method" (e.g. Point, CircleByCenterPoint) You only need to have one plugin pointing to all of your contributed objects. The package should be named after the plugin not the objects since there is a many to one relationship. (e.g. Geo-GoogleEarth-Pluggable- Plugin-MRDVT) Point Constructs a new Placemark Point object and appends it to the parent folder object. Returns the object reference if you need to make any setting changes after construction. my $point=$folder->Point(name=>"My Placemark", lat=>38.897607, lon=>-77.036554, alt=>0); LineString $folder->LineString(name=>"My Placemark", coordinates=>[ [lat,lon,alt], {lat=>$lat,lon=>$lon,alt=>$alt}, ]); LinearRing $folder->LinearRing(name=>"My Placemark", coordinates=>[ [lat,lon,alt], {lat=>$lat,lon=>$lon,alt=>$alt}, ]); TODO
Need to determine what methods should be in the Folder package and what should be on the Plugin/Default package and why. BUGS
Please log on RT and send to the geo-perl email list. SUPPORT
DavisNetworks.com supports all Perl applications including this package. AUTHOR
Michael R. Davis (mrdvt92) CPAN ID: MRDVT COPYRIGHT
This program is free software licensed under the... The BSD License The full text of the license can be found in the LICENSE file included with this module. SEE ALSO
Geo::GoogleEarth::Pluggable::Contrib::Point, Geo::GoogleEarth::Pluggable::Contrib::LineString, Geo::GoogleEarth::Pluggable::Contrib::LinearRing perl v5.14.2 2010-12-27 Geo::GoogleEarth::Pluggable::Plugin::Default(3pm)
All times are GMT -4. The time now is 11:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy