Sponsored Content
Top Forums Shell Programming and Scripting Looping and conditional branching on the command line Post 79865 by karlgo on Monday 1st of August 2005 05:06:56 PM
Old 08-01-2005
infierno - thank you for your reply...

I believe it gets me further down the road. Thank you for steering me in the right direction.

Thank you,

KG
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Looping through each line of text file

Dear all, I have a text file like below. eg.txt abcd efgh ijkl mnop I need a script, which should read the text file eg.txt and assign each line as a parameter. This , i wil use further to pass it a java command to invoke. All inside a for loop Need your help on this. With... (2 Replies)
Discussion started by: KrishnaSaran
2 Replies

2. Shell Programming and Scripting

Conditional reverse of certain file line order

Hi I am brand new to programming, I dont know how to go about this task, or what language is best for this...If there is an easy solution in different languages, I would love to see them. I want to learn about the steps to take on this, so Please put in comments where code is used. I believe in... (9 Replies)
Discussion started by: perlrookie
9 Replies

3. Shell Programming and Scripting

HELP Need in SED/PERL conditional line replacement

Hi , I need some help on perl/sed conditional replacement The situation is like below . I have a file contents like below . AAA|BBB|CCC|DDD AAA|BCF|CCC|HHH AAA|BVF|JJJ|KKK Here in the above file . I know my second column value (taking "|" as my delimited ) Basically I have to... (3 Replies)
Discussion started by: robin.r888
3 Replies

4. Shell Programming and Scripting

Conditional removing of words from a line

Hi , I have a .csv file,from which I want to remove some data from each column as below. Source Data GT_12_AUDIT,SCHEDULED,NOZOMI2010/GT_12_AUDIT,CTSCAN/Zh_GT_6547887/GT_12_AUDIT,CTSCAN/Zh_GT_6547887... (3 Replies)
Discussion started by: gaur.deepti
3 Replies

5. Shell Programming and Scripting

Conditional Multi-Line Grep Problem

Hi, I have a very large file I want to extract lines from. I'm hoping Grep can do the job, but I'm running into problems. I want to return all lines that match a pattern. However, if the following line of a matched line contains the word "Raw" I want to return that line as well. Is this... (3 Replies)
Discussion started by: redbluefish
3 Replies

6. Shell Programming and Scripting

conditional append one line in file.

Hi, Unix gurus, I have a requirement as following: checking existing file, if the file only contain one line. then append "No data" else keep existing file as is. can i achieve this by in command line without write a script. :wall: Thanks in advance. (4 Replies)
Discussion started by: ken002
4 Replies

7. Shell Programming and Scripting

Conditional Looping In Files

I have a req. where i need to read data from multiple files and take counts of row which satisfy the condition. e.g.: FILE1: Col1 Col2 Col3 12 ab cd 15 de fg 25 gh tm FILE2: Col1 Col2 Col3 21 ab1 cd1 13 de1 fg1 25 gh1 tm1 --- --- FILE-N... i need to find the count of rows... (6 Replies)
Discussion started by: kunal007
6 Replies

8. Shell Programming and Scripting

Process Detection and Conditional Branching . . .

Greetings! First post for this newbie :) If anyone has a moment to spare, I have a quick question for the community. For the record, I'm running Xubuntu 12.04... Based on a few hours' digging about, I've created an executable test script, "test.sh" which incorporates the following code: ... (7 Replies)
Discussion started by: LinQ
7 Replies

9. Shell Programming and Scripting

sed conditional \n replace for each line

How could be removed \n only if appearing at position 80 in the line? (4 Replies)
Discussion started by: RomanF
4 Replies

10. Shell Programming and Scripting

Looping on variable having new line \n fails

I have a for loop that constructs a variable "filelistonly" having entries separated by "\n" new line. The second, third & fourth while loops are my attempt to iterate the variable "filelistonly" upon new line "\n", however non of them work. Below is my script: //First Loop for i in... (2 Replies)
Discussion started by: mohtashims
2 Replies
ROAD(7) 						 Miscellaneous Information Manual						   ROAD(7)

NAME
road, gps - road map of the United States SYNOPSIS
games/road [ -g ] [ -s scale ] games/gps DESCRIPTION
Road displays a road map centered around some specified place in the United States. The data comes from the Census Bureau Tiger Database. The map is drawn in three shades of grey. Light grey is used for water features such as rivers, streams and lakes. Dark grey is used for railroads and airports. Black is used for roads. On terminals with ldepth zero, all shades appear black. Without options, the center of the map is the latitude and longitude specified in the file /lib/sky/here. If the -g option is given, the center of the map will be the latitude and longitude specified by continually monitoring the end of the file /tmp/gpslog. This file is written by the GPS satellite receiver program gps. With this option, and with gps running, road becomes a moving map display suitable for cars or planes. Keyboard commands s number sets the scale of the map to number. The number can be prefixed with + or - to increase/decrease the current scale. Scale 6 is about one mile across the screen and scale 10 is about ten miles across. Scales 1 through 10 are drawn with maximum detail showing all roads, trails, rivers, streams and airports. Scales 11 through 14 show highways, rivers, airports and county boundaries. Scales 15 through 20 show interstate highways and state boundaries. /regexp All features labeled by text matching the regular expression are highlighted. p place centers the map at the specified place. Usually the place must have the associated state code, (eg murrayhill,nj) but places like lax and ewr are also known. l latitude longitude centers the map at the specified coordinate. g toggles the -g option described above. q Exit. Mouse button commands Button 1 displays the text of the line nearest the cursor. Normally this is the name of a street or river. Button 2 displays the text of the place nearest the cursor. Normally this is a town. Button 3 centers the display on the cursor position. Gps reads /dev/eia0 assumed connected to a Garmin GPS-55 satellite receiver and writes the current location on the end of the file /tmp/gpslog. It is intended to be used with mobile PC's. FILES
/lib/roads/LLLL/LLLLGGGG.h scale 1-10 database files where LLLL is the latitude multiplied by 5 and GGGG is the longitude multiplied by 5. /lib/roads/LLL/LLLGGG.h scale 11-14 database files where LLL is the latitude multiplied by 1 and GGG is the longitude multiplied by 1. /lib/roads/LL/LLGG.h scale 15-20 database files where LL is the latitude multiplied by 0.2 and GG is the longitude multiplied by 0.2. /lib/roads/place /lib/roads/place.local are the translations between place names and locations. These files must be sorted. /lib/sky/here default starting map center. /tmp/gpslog moving map location. SOURCE
/sys/src/games/road /sys/src/games/gps ROAD(7)
All times are GMT -4. The time now is 10:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy