LinuxQuestions.org
Help answer threads with 0 replies.
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 07-30-2012, 08:30 AM   #1
Binay23
LQ Newbie
 
Registered: Jul 2012
Posts: 1

Rep: Reputation: Disabled
How to read each lines from a file where each line represent one file name


I have one file : temperory.txt,
this file contains name of log files : say :
log1
log2
log3

I am able to read those from file, but not able to find the errors in those particular logs..
 
Old 07-30-2012, 11:19 AM   #2
blue_print
Member
 
Registered: May 2010
Location: In world
Distribution: RHEL, CentOS, Ubuntu
Posts: 275
Blog Entries: 3

Rep: Reputation: 50
Isn't this question confusing? Please provide your exact issue/requirement
 
Old 07-30-2012, 11:26 AM   #3
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
Welcome to the forum.

Assuming bash/shell scripting, see here for general file reading techniques:

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


If you want more detailed help, then you'll have to provide a more detailed description of what you are doing. Describe exactly what your goals are, what the input is like, and what you want the output to be, and what you have tried to do so far. Post actual code and examples if possible.

Please read How To Ask Questions The Smart Way, and then post back.
 
  


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
How can I read a file line by line and add it to a loop in another file? astroumut Linux - Newbie 7 08-24-2009 04:37 AM
[SOLVED] use awk &/or sed to read file 1 line 1 & file 2 line 1 gr8scot Linux - General 6 07-12-2007 08:13 PM
php - Read file line by line and change a specific line. anrea Programming 2 01-28-2007 01:43 PM
Random file lines directed to a new file. In script an error. In command line no err leventis Programming 1 09-28-2006 07:16 AM
linux scripting help needed read from file line by line exc commands each line read atokad Programming 4 12-26-2003 10:24 PM

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

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