It looks like your little script snippit solved all my problems plus I feel like I've learned a lot as well, for which I'm greatful.
One quick thing though. When you have the "while read FILE", how does it know that the FILE is the /tmp/$$ file?
Glad it worked for you.
It doesn't -- it just reads from standard input. But the </tmp/$$ tells it what "standard input" is supposed to be, at the bottom of the loop.
Imagine it like this:
...except that there's an entire loop involved:
...in which the file gets opened once and put into standard input for read and anything else inside the loop to read as it pleases.
You can do that, in shell -- redirect the input and/or output of entire loops and statements:
Hi,
whenever I am giving a 'ls' command system is going into infinite loop displaying the current home directory.
There is no separate shell script/file with ls name anywhere in the system.
I am using Solaris 10.
Any help / guidance in solving this problem is highly appreciated.
... (3 Replies)
Hi guys, I'm having a problem getting my infinite loop to loop. It simply reads in the users choice form the menu, executes the corresponding case statement and quits instead of looping back to the main menu again. I have a feeling it might be something with my if then statements within the case... (2 Replies)
Production C code compiled without the dash-g option is running, and seems to be in an infinite loop. Is there a way to tell? Is there a diagnostic tool that will report what objects or what lines of code or even what functions are being executed?
Or is my best option to kill it with a dump?
... (5 Replies)
hi all,
this is how my scrip looks like
#!/bin/sh
bindir='/opt/apps/script/bin'
datadir='/opt/apps/script/data'
dir='/opt/apps/script'
while : ; do
ls -1rt /opt/apps/script/data/check.txt*|tail -1 > /dev/null 2>&1
if ;then
chmod +rwx $bindir/dummy2.sh
... (8 Replies)
I wanted to copy (not forward but copy) all incoming email to another address of mine. It worked, but now I encountered an infinite loop problem: When the second address doesn't like the content and bounces the message back, the bounce message will be sent back and forth.
So, what I have in... (1 Reply)
Hi All,
I need to run an infinite loop.
requirement below:
function1 --> creates a file file1
function2 ---> need to call if the file creates
i am running these both function via a script --> script.sh
i need to run the function1 first and if the file file1 creates then need to run the... (3 Replies)
1. The problem statement, all variables and given/known data:
My problem is an infinite loop when i press any other key other then Y or y in the while loop. what i want it to do is return to the normal script outside of it if pressing N or n or keep asking the same question if its any other... (4 Replies)
Im unable to stop the below infinite loop (bash script). Can someone tell me why this isnt responding to signals eg: ctrl+c (SIGINT) or ctrl+z
c=0
test_loop() {
c=$(($c+1))
echo "count value is : $c "
sleep 1
test_loop
}
Im using: SunOS 5.10
PS: If run this as... (13 Replies)
I have a script script.shwhich is scheduled to run at 11 AM everyday.
# script.sh Code:
./scb_script.sh &
unfortunately scb_script.sh is running today in infinite loop as respective files are not available.
My question, when script.sh starts running tomorrow, will the old process be... (1 Reply)
Discussion started by: JSKOBS
1 Replies
LEARN ABOUT CENTOS
reporter-print
REPORTER-PRINT(1) LIBREPORT MANUAL REPORTER-PRINT(1)NAME
reporter-print - Prints problem information to standard output or FILE.
SYNOPSIS
reporter-print [-v] [-d DIR] [-o FILE] [-a yes/no] [-r]
DESCRIPTION
The tool reads problem directory DIR and prints its text representation to stdout or to a specified FILE.
Integration with ABRT events
reporter-print can be used as a reporter, to allow users to report problems by writing them to a file. Example:
EVENT=report reporter-print -o "${Log_File:-/tmp/abrt.log}"
OPTIONS -d DIR
Path to problem directory.
-v
Be more verbose. Can be given multiple times.
-o FILE
Output file
-a yes/no
If -o FILE is specified, controls whether FILE is appended to, or overwritten. (default: no)
-r
Add a record to reported_to in DIR which specifies that this problem was reported. Some tools use this to differentiate between
problems which were and weren't yet reported.
Output format
The output is designed to be machine-parsable. The elements which have only one line are printed in the form
NAME:<whitespace>VALUE
Elements which have more than one line are printed in the form
NAME:
:LINE1
:LINE2
:LINE3
Output may contain empty lines for better readability.
AUTHORS
o ABRT team
LIBREPORT 2.1.11 06/18/2014 REPORTER-PRINT(1)