LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 01: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 01:48 AM. Reason: to be more precise
 
Old 02-03-2012, 03: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, 04: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, 11:24 AM   #4
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
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



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 10:02 PM
java swing receiving input (strings) from a jtextfield Infasoft Programming 6 10-20-2008 03:59 PM
use greater than or equal to operators on a file/output shabev Linux - Enterprise 3 03-25-2008 02:09 PM
Strings and input marales314 Programming 6 01-24-2005 12:32 AM
BASH: Output everything between two strings systemparadox Programming 2 12-18-2004 10:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:52 AM.

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
Open Source Consulting | Domain Registration