LinuxQuestions.org
Visit Jeremy's Blog.
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 10-20-2010, 12:55 PM   #1
lipun4u
Member
 
Registered: Sep 2008
Location: Mumbai, india
Distribution: ubuntu and hp-unix
Posts: 118

Rep: Reputation: 15
o/p in periodic interval


i have a certain no of files in a specific folder. i need to read the first line of each file in regular interval. the o/p should come at the center of the screen.

plz suggest me how to do...
 
Old 10-20-2010, 03:48 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,945

Rep: Reputation: 8017Reputation: 8017Reputation: 8017Reputation: 8017Reputation: 8017Reputation: 8017Reputation: 8017Reputation: 8017Reputation: 8017Reputation: 8017Reputation: 8017
Quote:
Originally Posted by lipun4u View Post
i have a certain no of files in a specific folder. i need to read the first line of each file in regular interval. the o/p should come at the center of the screen.

plz suggest me how to do...
Spell out your words.

And what do you mean by "o/p"?? Center of WHAT screen?? Console/Xterm/Web? Are you wanting a GUI application, Applet, or CLI app???

You don't provide details, so we can't help you. Tell us what you're trying to accomplish, provide samples of the data, and we can try to assist.
 
Old 10-22-2010, 12:30 PM   #3
lipun4u
Member
 
Registered: Sep 2008
Location: Mumbai, india
Distribution: ubuntu and hp-unix
Posts: 118

Original Poster
Rep: Reputation: 15
i want the output on the center of console.


it's a cli.

plz tell me....
 
Old 10-22-2010, 01:55 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,945

Rep: Reputation: 8017Reputation: 8017Reputation: 8017Reputation: 8017Reputation: 8017Reputation: 8017Reputation: 8017Reputation: 8017Reputation: 8017Reputation: 8017Reputation: 8017
Quote:
Originally Posted by lipun4u View Post
i want the output on the center of console.

it's a cli.
plz tell me....
Again, SPELL OUT YOUR WORDS, and provide decent details. You STILL provide no sample data, no details about your 'console' (Xterm? Serial? Size?? What??), and have not yet said what an "o/p" is, or what your'e doing to read it.

Answer the questions, provide details, or we won't be able to help you.
 
Old 10-22-2010, 02:12 PM   #5
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Post

Quote:
Originally Posted by TB0ne View Post
and have not yet said what an "o/p" is, or what your'e doing to read it.
I *think* he wants to say OutPut.

@OP:
1.) clear cli with 'clear'.
2.) echo blanks until middle of screen reached.
3.) read -r line < file1 for i/p of first line in file into var line
4.) echo $line
5.) repeat step 1-4 for file2, file3 and so on
 
  


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
Periodic Daemon nmukerje Linux - Newbie 2 07-22-2009 05:59 PM
periodic network down velumurugesan Linux - Networking 3 04-11-2008 01:28 AM
periodic freezes AhYup Slackware 1 02-13-2005 10:14 PM
periodic freezing piccardcapt Linux - General 3 06-16-2003 08:18 AM
Periodic stalls in X Tyco Slackware 3 06-07-2003 02:25 PM

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

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