9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Gents,
I have a script which will run others scripts .
Example
#!/bin/bash
script1
script2
script3
script4
I would like to stop all process if any of the script got errors?. If for example script1 works fine will continue script2, then if the script2 got errors, The bash should... (2 Replies)
Discussion started by: jiam912
2 Replies
2. Shell Programming and Scripting
I want to abort script if input variable matched first field in any line of a file.
#!/bin/sh
read INPUTVAR1
awk "{if(\$INPUTVAR1 == $1) x = 1} END {if(x==1) print \"I want to abort script here\"; else print \"OK\"}" /etc/some.conf
I tried "exit" and system("exit") but no luck. (1 Reply)
Discussion started by: urello
1 Replies
3. Shell Programming and Scripting
I have below file. I want to remove space at begining of every line and then after also remove blank line from file.
I use below code for each operation.
sed -e 's/^*//' < check.txt > check1.txt
sed '/^\s*$/d' < check1.txt > check2.txt
above code not remove all the space... (12 Replies)
Discussion started by: Mohin Jain
12 Replies
4. Shell Programming and Scripting
Hi All,
I have a requirement where if Source Count is not equal to Target count, then I need to exit/abort the script and come out. Then send an email to thummi@email.com saying "RECORD COUNT DOES NOT MATCH. Please need your help.
Here is what I have written : If even the count is not... (1 Reply)
Discussion started by: thummi9090
1 Replies
5. Solaris
Below is my shell script from which I am trying to invoke few Hive SQL queries and the below shell script works fine.
Problem Statement:-
If you see my first `hive -e` block in the below shell script which contains a very long Hive SQL query. Sometimes that Hive SQL query gets failed due to... (1 Reply)
Discussion started by: raihan26
1 Replies
6. Shell Programming and Scripting
I am calling SQL script in my UNIX Shell script and trying to create the CSV file and my last column value of each row is 23 blank spaces.
In my SQL script,the last column is like below.
RPAD(' ',23,' ') -- Padding 23 blank Spaces
The CSV file is generated but the sapce(23 spaces) is... (2 Replies)
Discussion started by: praka
2 Replies
7. Shell Programming and Scripting
Hi,
I would like to know given executing a file with inputs, I would like to know when does it terminate /abort abnormally.
I tried to append an echo $? after executing my program which is in C. However, there is nothing..It shows 0 even though the program actually exit.
my command is... (1 Reply)
Discussion started by: ahjiefreak
1 Replies
8. UNIX for Advanced & Expert Users
I'm running Red Hat Linux 2.6.7 on a x86_64 box.
I have a core file from a program that called abort(). Does anyone here know how can I get a backtrace? (Re-creating the error with svd running inside gdb has proved impossible).
% gdb svd core.25223
GNU gdb Red Hat Linux... (2 Replies)
Discussion started by: svact
2 Replies
9. Shell Programming and Scripting
I have a little bash script that includes make to compile with g++ and then a statement to actually run the compiled program. When it (the script) gets a syntax error, it does not abort and continues to run the previous version of the program.
How can I make the script abort when g++ generates a... (1 Reply)
Discussion started by: siegfried
1 Replies