![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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 |
| Display Modes | Rate This Thread |
|
|