LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-03-2012, 02:46 AM   #1
chanchong chau
LQ Newbie
 
Registered: Feb 2012
Posts: 2

Rep: Reputation: Disabled
input and output strings separated by operators


need clarification on relations on input and output strings separated by operators. liken it to learning basic grammar rules of a new language to enable one to move forward.

Last edited by chanchong chau; 02-03-2012 at 02:48 AM. Reason: to be more precise
 
Old 02-03-2012, 04:35 AM   #2
eehmke
LQ Newbie
 
Registered: Aug 2011
Distribution: Debian, Gentoo
Posts: 24

Rep: Reputation: 0
Quote:
Originally Posted by chanchong chau View Post
need clarification on relations on input and output strings separated by operators. liken it to learning basic grammar rules of a new language to enable one to move forward.
What language are you talking about?
 
Old 02-03-2012, 05:03 AM   #3
chanchong chau
LQ Newbie
 
Registered: Feb 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
It is about bash as a starting point

the things I read about bash on the books were mostly about parsing string. So please base your reply on BASH. Thank you for enlightening people like me!
 
Old 02-03-2012, 12:24 PM   #4
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Your question is very vague and hard to understand. If you have a specific example of what you want to do, please post it.

In general, Bash and other shells work by storing strings in variables, manipulating the contents in various ways, and then echoing them back out in your desired format. There are a large number of techniques available for doing all of these steps, and what to use depends on exactly what you need to do.

string manipulation


The nearest I can guess from your post is that possibly you want to break up a line/string based on some delimiter? If so, this is probably best done by reading the line into an array, using the IFS variable (or a similar delimiting function, depending on the technique used) to specify the character used for dividing the fields.

http://mywiki.wooledge.org/BashGuide/Arrays
http://mywiki.wooledge.org/BashFAQ/005

I also suggest reading through the bash guide here to get a better grasp on the basic scripting concepts.

http://mywiki.wooledge.org/BashGuide
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
want to list output in single line (space separated) saini_mw Linux - Newbie 8 02-01-2011 11:02 PM
java swing receiving input (strings) from a jtextfield Infasoft Programming 6 10-20-2008 04:59 PM
use greater than or equal to operators on a file/output shabev Linux - Enterprise 3 03-25-2008 03:09 PM
Strings and input marales314 Programming 6 01-24-2005 01:32 AM
BASH: Output everything between two strings systemparadox Programming 2 12-18-2004 11:26 AM


All times are GMT -5. The time now is 04:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration