Now, this is quite confusing. Let me try to paraphrase what I can infer from your spec:
In directory ${MY_GIT_TOP}/body/Ue/test you run make test_trinity_svp twice (WHY?), but in between you treat (csplit et al) first make's log files obviously produced in relative directory bait. On the second make, you want to check if an error occurred grepping the FIRSTmake's output.
How about a slightly different approach? grepping the entire log file has the advantage that it will quit after the first match; searching through the many split files will open and traverse every single of them, which may take seriously longer.
Does ftp from unix have an exit status. In the sense after ftp is invoked and if the ftp fails during file transfer does it exit out with a status other than 0. What is do right now is invoke ftp and right it to a log and then grep for 'File Transferred Sucessfully'. Is this the only way to do it... (1 Reply)
i downloaded a text file from metalab.unc.edu called sh.txt and in this reference manual it refers to shell scripting exit status .. at the end of one of the examples that author gave an exit status of 127..
to what does a 127 exit status refer too and what is its purpose in the code.
moxxx68 (1 Reply)
Hi all,
I'm running a program which return 1 upon success.
But when encounters problem shell return 's '1' .
How to differentiate between them the shell return value and script return value.
Ex. function fn return '1' if executed successfully and '0' if failed. But when if shell encounters... (1 Reply)
I'm preparing for exam and one of exams is to write own test command...
I wonder if in unix is a command which just returns exit code you specify..
I know I can easily write a function like this:
exStatus() {
return $1
}
-> my question is rather theoretical
thank you! (9 Replies)
Hi I have following code
I want If whole code executes successfully then return true If found any error then print the error
I tried if ; then
But this checks only for the just upper line execution
#!/bin/bash
PATH1=/var/log/mysql
PATH2=/home/ankur/log
FILE1=mysql-bin.index... (4 Replies)
Hi,
I'm having this simple code below, the file serverlist has a list of IPs one per line. When executed the while loop is executed only once, after that the program terminates. How should i redirect the exit status, so that the entire list of IP will get executed?
#!/bin/bash
exec <... (4 Replies)
is there a way to compare two files using diff (ex: diff 1.txt 2.txt) in an if statement?
I read that the exit status of diff is 0 if the files contain the same content. 1 if they're different. So what I am attempting is basically:
if ; then
echo "they're the same"
else
... (2 Replies)
I have a shell script (#!/bin/sh) that interacts with Appworx and Banner Admin. In my script I want to check the exit status of awrun before continuing. awrun can run for 10 seconds or it can run for over a minute. So my question is, will it go through my if statement before awrun may even be... (2 Replies)
Hi ,
I have a bash script , which does the network configuration. Messages from this script are dumped on console as well as stored in a log file .
This script is invoked from a C code using system call . The script returns different exit code , to indicate different error cases. The... (1 Reply)
Hi All,
I am trying to create a zip file with all the txt files(these are in large number) in the current directory. I am able to do this operation sucessfully.
After this i want to get the status of the tar command executed and do accordingly. When i am trying with the below code, the status... (3 Replies)