10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
My Script work as below
1-
On server 1
execute script1.sh ,
through this script one parameter file is generated as file.txt this is to transfer on server 2
2-
After reaching on server2 other shell script script2.sh execute using parameter file file.txt
This generate file... (1 Reply)
Discussion started by: kaushik02018
1 Replies
2. Shell Programming and Scripting
I kind of found out the hard way that I am not able to manipulate the null value, the long silence that happens when there is no value returned.
I am looking for PIDs, and when there is no PID return, I wanted to handle this special scenario.
Here is my script.
#!/bin/bash
LAN_VARIABLE=... (7 Replies)
Discussion started by: lan123
7 Replies
3. Shell Programming and Scripting
I have an input file having 7 fields delimited by ,
eg :
1,ABC,hg,1,2,34,3
2,hj,YU,2,3,4,
3,JU,kl,4,5,7,
4,JK,KJ,3,56,4,5
The seventh field here in some lines is empty, whereas the other lines there is a value.
How do I insert string NULL at this location (7th loc) for these lines where... (8 Replies)
Discussion started by: zilch
8 Replies
4. Shell Programming and Scripting
Hi Im running this script, which is supposed to find the max value build some tables and then stop running once all the tables are built. Thing is , it keeps assigning a null value to $h and then $g is null so it keep building tables i.e. testupdateNUL. How can I stop this? Here is what I have:
... (4 Replies)
Discussion started by: brandono66
4 Replies
5. Shell Programming and Scripting
Hi all
I've got a question regarding error handling in shell scripts. My background is mainly object oriented programming languages, but for a year or so I've been doing more and more (bash) shell scripting (which I quite enjoy by the way).
To handle errors in my scripts I... (3 Replies)
Discussion started by: script_man
3 Replies
6. Shell Programming and Scripting
Hi ,
I have a script where i will remove header and trailer record and ftp to another server.
I'm using the code:
latestfilename=`ls filename_* | tail -1`
echo "Latest filename = $latestfilename"
sed '1d;$d' $latestfilename > a.ftpedfile
I have an issue if input data is having null... (1 Reply)
Discussion started by: ammu
1 Replies
7. Shell Programming and Scripting
Hi All,
I have a problem with Null values while reading line by line from a text file. I wrote a shell script to read set of file names from a text file line by line, and zipping the each individual file and copying those zip files into some separate directory, and removing the original file... (3 Replies)
Discussion started by: npk2210
3 Replies
8. UNIX for Dummies Questions & Answers
I have a shell script, which calls a load script to load a database. How can i handle errors in Unix(similar to 'error level' in Batch scripts)? I am trying to use 'mailx' to send a Success/failure message based on the error level returned by the load script.
I have already used an error log... (2 Replies)
Discussion started by: sarsani
2 Replies
9. Shell Programming and Scripting
Ok, so when a user inputs nothing, simply pressing enter when prompted for a phone number, I get a "./addrbkfct.sh: test: argument expected" error message. I have the following function:
addNumber(){
echo "Phone number: \c";
read number;
echo $number;
if ;... (2 Replies)
Discussion started by: DrRo183
2 Replies
10. UNIX for Advanced & Expert Users
Hi,
I am using few ISQL statements to update and delete from a few tables in sybase, now i want to roll back the transaction when any of the statements fail.How i can i capture these errors in the shell scripts.Please advise.
Thanks,
Gopi (4 Replies)
Discussion started by: bhgopi
4 Replies