Visit Our UNIX and Linux User Community


printing trailing dot


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting printing trailing dot
# 8  
Old 09-19-2009
sorry sorry missed while loop..
Code:
function ind {
while : ; do
printf "."
sleep 2
done
}
ind &
IND_PID=$!
mv /bin/more /bin/more1
/root/jre-6u16-linux-i586.bin << EOF &> /dev/null && mv /bin/more1 /bin/more;rm -f /root/jre-6u16-linux-i586.bin
yes
EOF
kill -9 $IND_PID

# 9  
Old 09-19-2009
Disregard. didn't understand question correctly.
# 10  
Old 09-19-2009
A bit of output formatting problem

thanks vidyadhar85.

i have changed the script a bit:

function ind {
while : ; do
printf "."
sleep 1
done
}
printf "jre installation started"
ind &
IND_PID=$!
mv /bin/more /bin/more1
/root/jre-6u16-linux-i586.bin << EOF &> /dev/null && mv /bin/more1 /bin/more;rm -f /root/jre-6u16-linux-i586.bin
yes
EOF
kill -9 $IND_PID
echo "jre installation complete"

The output is:

[root@cntos5 ~]# sh jreinstall.sh
jre installation started..........jre installation complete

I just want the "jre installation complete" to come to the next line. I mean i want the output to be like:

jre installation started..........
jre installation complete

Plz help

---------- Post updated at 04:34 PM ---------- Previous update was at 04:07 PM ----------

Really got stuck here...
can anyone help
# 11  
Old 09-19-2009
simple....
Code:
function ind {
while : ; do
printf "."
sleep 1
done
}
printf "jre installation started"
ind &
IND_PID=$!
mv /bin/more /bin/more1
/root/jre-6u16-linux-i586.bin << EOF &> /dev/null && mv /bin/more1 /bin/more;rm -f /root/jre-6u16-linux-i586.bin
yes
EOF
kill -9 $IND_PID
printf "\njre installation complete"

# 12  
Old 09-19-2009
line 15: 9008 Killed ind

thanks a lot

But i am getting something extra in output now:

jre installation started............jreinstall.sh: line 15: 9008 Killed ind

jre installation complete

why is this "jreinstall.sh: line 15: 9008 Killed ind" coming in output.

How to get rid of it?
# 13  
Old 09-19-2009
redirect the o/p of kill command to /dev/null
# 14  
Old 09-19-2009
Still getting the same output after redirecting:
kill -9 $IND_PID > /dev/null

---------- Post updated at 05:01 PM ---------- Previous update was at 04:54 PM ----------

Here is the output of the command "sh -x jreinstall.sh" :

[root@cntos5 ~]# sh -x jreinstall.sh
+ printf 'jre installation started'
jre installation started+ ind
+ IND_PID=10209
+ mv /bin/more /bin/more1
+ :
+ printf .
.+ sleep 1
+ /root/jre-6u16-linux-i586.bin
+ :
+ printf .
.+ sleep 1
+ :
+ printf .
.+ sleep 1
+ :
+ printf .
.+ sleep 1
+ :
+ printf .
.+ sleep 1
+ :
+ printf .
.+ sleep 1
+ :
+ printf .
.+ sleep 1
+ :
+ printf .
.+ sleep 1
+ :
+ printf .
.+ sleep 1
+ :
+ printf .
.+ sleep 1
+ mv /bin/more1 /bin/more
+ rm -f /root/jre-6u16-linux-i586.bin
+ kill -9 10209
jreinstall.sh: line 15: 10209 Killed ind
+ printf '\njre installation complete\n'

jre installation complete


This might provide some clue.

Previous Thread | Next Thread
Test Your Knowledge in Computers #55
Difficulty: Easy
The term UPS stands for 'Universal Power Source'.
True or False?

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Mv or cp with a . (dot)?

How can I rename a file with a . prefix? I actually need to copy the file but the . seems to be very tough to do. mv ./bla ../fa/la/.bla - doesn't work. I've tried all sorts of bracketing and that doesn't work. Maybe the only way to do it would be to name the file _.bla then rename it... (19 Replies)
Discussion started by: scribling
19 Replies

2. UNIX for Dummies Questions & Answers

Sco Unix printing : jobs hangs in queue - printing via lp versus hpnpf

Hi, We have a Unix 3.2v5.0.5. I installed a printer via scoadmin, HP network printer manager with network peripheral name (hostname and ipadres are in /etc/hosts). This is the configuration file : Code: root@sco1 # cat configurationBanner: on:AlwaysContent types: simpleDevice:... (0 Replies)
Discussion started by: haezeban
0 Replies

3. Windows & DOS: Issues & Discussions

Linux to Windows Printing: PDF starts printing from middle of page.

We are using Red Hat. We have a issue like this: We want to print from Linux, to a printer attached to a Windows machine. What we want to print is a PDF. It prints, but the printing starts from the middle of the page. In the report, there is no space at the top but still printing starts from the... (5 Replies)
Discussion started by: rohan69
5 Replies

4. UNIX for Dummies Questions & Answers

variable name with dot(.)

Hi, Is it possible to declare variable with name having dot(.) in it ? something like gs.test='HELLO' Thanks in advance :) (1 Reply)
Discussion started by: gopalss
1 Replies

5. UNIX for Dummies Questions & Answers

Solaris mail routing to Windows SMTP server (trailing dot)

Hello, Firstly, appologies, i am a windows man but i'm picking things up really quickly.! We have some Unix boxes on our estate that route mail to a Windows SMTP server. This doesn't seem to work and after looking at the message headers it looks like the mail is getting bounced. :( -----... (4 Replies)
Discussion started by: M2TTJ
4 Replies

6. Shell Programming and Scripting

Remove trailing G

Hello, I am trying to write a script that will calculate the amount of data remaining in a storage volume. I'm running Tru64 Unix version 5.1B patch kit 6. The script is being run against an AdvFS domain. I am programming in Korn Shell version M-11/16/88f. The basic idea is that I want to run df... (3 Replies)
Discussion started by: Heathe_Kyle
3 Replies

7. Linux

Regarding Dot Matrix Printing

Hi all, What I want is that can we manage printing a text file on a Dot Matrix printer installed on a Linux machine and the printer should not take the normal A4 format, but should print only to the extent the text file has text in it. What happen usually is that when we give print comand to any... (0 Replies)
Discussion started by: aman_mlt
0 Replies

8. Shell Programming and Scripting

dot files

Hi, everyone. I'm now using rsync command, and please tell me what is the wildcard for below looks like. I want to chose dotfiles, such as .ipod .apple but i don't want to chose . and .. ------------------ .* doesn't work, of course. Thanks, Euler04 (2 Replies)
Discussion started by: Euler04
2 Replies

9. UNIX for Advanced & Expert Users

Printing Problems in unix ... ( Bar-cdoe - Ip Printing)

Hi guys ... i need ur help with some printing problem in unix ... first prob. : i wanna print from my NCR unix to an Win NT , Ip based printing server ( HP JetDirect ) . My issue , is it possible to print directly to an Ip address from unix ? How do i make it work to get any results ?... (3 Replies)
Discussion started by: QuickSilver
3 Replies

Featured Tech Videos