ggFTW

MMORPG Gamer Community


Go Back   ggFTW Forum > Off Topic > Life & Relationships > Homework Help

Prius Online
Looking for a new MMO?

Try 

Prius Online

Rating:  

7.6

 
LinkBack Thread Tools Display Modes
11-15-2010   #1 (permalink)
fat fat fat fat fat PIG
PROBLEMS BUTA?!
Special Games
Aika OnlineAll Point Bulletin (APB)Alliance of Valiant ArmsAsda Story
 
Join Date: Sep 2008
Posts: 4,489
iTrader: (0)
buta has a reputation beyond reputebuta has a reputation beyond reputebuta has a reputation beyond reputebuta has a reputation beyond reputebuta has a reputation beyond reputebuta has a reputation beyond reputebuta has a reputation beyond reputebuta has a reputation beyond reputebuta has a reputation beyond reputebuta has a reputation beyond reputebuta has a reputation beyond repute
Default Unix Script

So I have a homework where I have to run a script that does prints out numbers every 3 seconds called count, except the teacher wants me to run it in the background and have the output not show up on screen.

As she wrote it:
Quote:
Start a second 'count' job in the background, but this time don't let the output show up on screen.
The code is basically:
Code:
#!/bin/bash

num=1
while [[ $num > 0 ]]
do
   echo "num is " $num
   (( num = num + 1 ))
   sleep 3
done
So I know how to get it to run in the background, but not how to keep the output from showing up on screen. Given that it is in the same section as redirecting of output, I'm wondering if she possibly wanted us to just redirect the output to a file.

Or is there some other way that I'm missing?

Thank yous!
__________________
 
Get rid of this ad by registering for our community.
11-15-2010   #2 (permalink)
and more came out
iFarted's Avatar
Games
AuditionFlyFFGunboundLa Tale
 
Join Date: Oct 2008
Location: On my toilet atm @_@
Posts: 903
Blog Entries: 6
iTrader: (0)
iFarted has much to be proud ofiFarted has much to be proud ofiFarted has much to be proud ofiFarted has much to be proud ofiFarted has much to be proud ofiFarted has much to be proud ofiFarted has much to be proud ofiFarted has much to be proud ofiFarted has much to be proud of
IGN: BANNED!
Default

You are welcome.
__________________
 
11-15-2010   #3 (permalink)
fat fat fat fat fat PIG
PROBLEMS BUTA?!
Special Games
Aika OnlineAll Point Bulletin (APB)Alliance of Valiant ArmsAsda Story
 
Join Date: Sep 2008
Posts: 4,489
iTrader: (0)
buta has a reputation beyond reputebuta has a reputation beyond reputebuta has a reputation beyond reputebuta has a reputation beyond reputebuta has a reputation beyond reputebuta has a reputation beyond reputebuta has a reputation beyond reputebuta has a reputation beyond reputebuta has a reputation beyond reputebuta has a reputation beyond reputebuta has a reputation beyond repute
Default

iFarted helped me figure that one out, but now I have another question.

How do you change the PATH environment variable so that you can run scripts from any subdirectory in your home directory?
__________________
 

Bookmarks

Thread Tools
Display Modes

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


Pockie Ninja
Need a new browser game?

Try 

Pockie Ninja

Rating:  

8.3
Hide this banner by registering for our community.