The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Some simple question abt Unix kernel melbdavid UNIX for Dummies Questions & Answers 2 06-03-2007 07:06 AM
Simple Windows-to-Unix SCP question Duchesne UNIX for Dummies Questions & Answers 2 04-07-2007 01:21 AM
Simple C question... Hopefully it's simple Xeed High Level Programming 6 12-15-2006 02:29 PM
I have a simple unix question smn2003 UNIX for Dummies Questions & Answers 1 12-10-2005 04:06 PM
Ok simple question for simple knowledge... Corrail UNIX for Dummies Questions & Answers 1 11-28-2005 01:03 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 11-24-2005
djt0506 djt0506 is offline
Registered User
  
 

Join Date: Nov 2005
Posts: 5
Simple Unix Question

Hi all,

ok here is my problem, my program below is reading lines in from a file (one at a time) and printing them out. my problem is that i want it to only print out 3 lines at a time on the screen, but the "read value" command in my code isnt working. Whats wrong? & what can i do to get this working?

Thanks all for you replies in advance.

IFS=^
clear
counter=0
file=$1
cat $file |
while read line
do
counter=`expr $counter + 1`
set $line
echo -e "\t\t------------------------------------------------"
echo -e "\t\t| Name: $1 \r\t\t\t\t\t\t\t\t|"
echo -e "\t\t| Address : $2 \r\t\t\t\t\t\t\t\t|"
echo -e "\t\t| $3 \r\t\t\t\t\t\t\t\t|"
echo -e "\t\t| $4 \r\t\t\t\t\t\t\t\t|"
echo -e "\t\t| PhoneNumber: $5 \r\t\t\t\t\t\t\t\t|"
echo -e "\t\t| Fax Number: $6 \r\t\t\t\t\t\t\t\t|"
echo -e "\t\t| E-mail: $7 \r\t\t\t\t\t\t\t\t|"
echo -e "\t\t| Website: $8 \r\t\t\t\t\t\t\t\t|"
echo -e "\t\t| |"
echo -e "\t\t| o o |"
echo -e "\t\t------------------------------------------------"
echo " "

if [ $counter = 3 ]
then
echo "Hit Enter to continue..."
read value
fi
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:17 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0