The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
NEC2 graphic post-processor 1.4 (Default branch) iBot Software Releases - RSS News 0 01-22-2008 09:10 PM
LPAR processor/virtual processor settings guttew AIX 1 02-01-2007 01:52 PM
How to get Processor Id atul.saxena Shell Programming and Scripting 1 04-06-2006 10:37 AM
CPU Processor ID UXNI AIX 9 09-04-2005 09:13 AM
Processor jwbrown UNIX for Dummies Questions & Answers 5 06-13-2001 09:28 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 11-23-2006
Retribution Retribution is offline
Registered User
  
 

Join Date: Nov 2006
Posts: 3
Need help with a post-processor

So here is a snippet from an analysis of test runs conducted in a robot experiment in the form of a table:

-----------------------------
| TN | TE | PA | PB |
-----------------------------
| Y | N | - | B |
| N | Y | A | B |

TN = Is the target north?
TE = Is the target east?
PA = Is there a passage ahead?
PB = Is there a passage behind?


How would I go about in writing a BASH script that accepts from the standard input for example:

Code:
echo "| Y | N | - | B |" | ./test
(Straight into the terminal)

And give the output "Target is north, passage behind" for that particular example? This script must take into condition all possible scenarios when conducting the test.

Another example would be:
Code:
 echo "|       N       |     Y     |       A      |      B      |" | ./test
This would output on the standard out "Target is east, passage ahead, passage behind". If anyone can hint me in the right direction then that would be truly appreciated!
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:36 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0