9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a shell script which executes some sql. When the shell script executes the sql's logging is shown on the console. I need to grep some data from this output shown on console. So I do the following
hive -f load.adj.hql 2>&1 | tee c.txt
echo $?
A=`grep num_rows c.txt`
$? will... (1 Reply)
Discussion started by: wahi80
1 Replies
2. Red Hat
Hi,
I have 2 machines in production environment:
1. redhat machine for application
2. DB machine (oracle)
The application doing a lot of small read&writes from and to the DB machine.
The problem is that after some few hours the network from the application to the DB becomes very slow and... (4 Replies)
Discussion started by: moshesa
4 Replies
3. Shell Programming and Scripting
Hi folks,
I am running below code which is giving me output "httpd (no pid file) not running", how can i grep this code in shell script.
I have tried below code but it is not giving me error in echoing.
./webserver stop
if
echo " Everything is OK"
else
echo "Error code $0... (4 Replies)
Discussion started by: learnbash
4 Replies
4. Shell Programming and Scripting
Hi,
We are getting the following error code while connection remote server using sftp command.
sftp user@serrver
Warning: child process (/opt/ssh2/bin/ssh2) exited with code 126.
pls Advise. (2 Replies)
Discussion started by: koti_rama
2 Replies
5. Cybersecurity
Hi,
I'm trying to set up scp but it isn't as nice as WinSCP. My requirement is to transfer a file from one machine to another with scp. This would run in a .ksh so it would need to avoid prompts (password/are you sure). First I tried this with v2: SSH with Keys HOWTO: SSH with Keys in a console... (1 Reply)
Discussion started by: Dird
1 Replies
6. Shell Programming and Scripting
I need to try and get the error return code from the tar command when being used as follows:
tar tvf tarfile 2>logfile | tee -f outputfile
ErrorStat="$?"
I would like to save the error return code from the tar command in a variable,
howver, the example above it is saving the 'tee' error... (7 Replies)
Discussion started by: nck
7 Replies
7. Shell Programming and Scripting
Hi all
below is a snippet of my perl codesystem ("scp -pq $dest_file $path");How i can i trap the return status? ie if the scp fails how can i know ? (2 Replies)
Discussion started by: new2ss
2 Replies
8. Shell Programming and Scripting
I have a unix AIX script that ftps some files (mput, mget). How can I check (in the script) to see if the ftp failed? After the ftp I move the files out of the directory but do not want to move files that have not been sent. The script will run as a cron job. (2 Replies)
Discussion started by: rayg50
2 Replies
9. UNIX for Dummies Questions & Answers
Appreciate your thoughts....I m very new to this. Anyone here have the similar experience and work around. Thanks.
Use scp to send a file from HP-UX to SUN box successfully but return code randomly being generated. The majority of time reports 1 (meaning not ok) and sometime 0 (OK).
When scp... (0 Replies)
Discussion started by: huiraym
0 Replies