LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-22-2004, 04:57 AM   #1
daphne19
LQ Newbie
 
Registered: Apr 2004
Posts: 1

Rep: Reputation: 0
parsing a user input string


Hi I've just got a question for scripting in bash shell.

I'm reading from a user a certain input A<"test"> B<"test2"> and i want to be able to pull out teh test bit of teh input based on the starting letter. So if "B" then get test2 out. Essentially its just string parsing and I can do it for command line input but im unsure of how to handle a read input.

Thanks for your help
daphne
 
Old 04-22-2004, 07:40 AM   #2
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 36
I'm not clear on what you want other than a way to manipulate strings.

This page shows most of the ways bash provides to mess with strings.
Beyond that, you need awk.

http://www.tldp.org/LDP/abs/html/str...ipulation.html
 
  


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
(shell script) string parsing kuru Programming 4 09-12-2005 07:59 PM
parsing standard input with bash arosales Programming 3 07-16-2005 10:42 AM
Perl/regexp help... - query string parsing... lowpro2k3 Programming 4 05-11-2005 05:18 PM
string input tekmorph Programming 3 10-25-2004 08:03 PM
Parsing a file for a string of text jamesmwlv Linux - General 2 12-02-2002 07:13 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:31 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