I have writen a simple bash program. I want to run it as a background process. But it's getting stopped. I do not want that to happen. Kindly help
/#!/bin/bash
while [ 1 ]; do
command1 | cut -f 3
sleep 5;
done
OUTPUT:
Linux# /tmp/program &
[19] 20162
Linux# Line 1
0
[19]+ Stopped /tmp/command
Output explanation:
Line 1 and 0 are the output , and this output should be displayed every 5 secs which is what i want.
What happens: After displaying Line 1 and 0, control hangs, I press enter, I get the Stopped message. Kindly help me get rid of this.