LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 06-11-2012, 02:16 PM   #1
rameshpaul_cog
LQ Newbie
 
Registered: May 2012
Posts: 19

Rep: Reputation: 0
Reading multiple input from a file using cut and do action.


Hi,

I need to read a input from a file with cut command or any and it has to display the cut portions from the file and ask the user to proceed.

ex: text1:text2:text3 in a file abc.txt
(it has to parse each variable and display to user to proceed)

say like
abc is : text1
def is :text2

shall i proceed ? y/n

Please help me in this!!

TIA
 
Old 06-11-2012, 04:15 PM   #2
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
We're not going to do it all for you, but here are a few links to get you started:

http://mywiki.wooledge.org/BashGuide

How can I read a file (data stream, variable) line-by-line (and/or field-by-field)?
http://mywiki.wooledge.org/BashFAQ/001

How do I do string manipulations in bash?
http://mywiki.wooledge.org/BashFAQ/100


And please use ***[code][/code] tags*** around your code and data, to preserve formatting and to improve readability. Please do not use quote tags, colors, or other fancy formatting.
 
  


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
[SOLVED] Read from Input File and Append to Multiple Files bridrod Linux - Newbie 8 11-24-2010 08:05 PM
Logitech Dual Action Gamepad - no input detected on Kubuntu 8.04 DrTwox Linux - Hardware 0 06-13-2010 09:12 PM
Create a Multiple files by reading a input file and changing the contents bhargavkr Linux - Newbie 4 09-17-2009 01:37 AM
How to use command grep,cut,awk to cut a data from a file? hocheetiong Linux - Newbie 7 09-11-2008 08:16 PM
shell script having multiple grep statements-I want input file to be read only once mukta9003 Linux - Newbie 4 08-27-2008 01:58 AM


All times are GMT -5. The time now is 11:11 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration