Sponsored Content
Full Discussion: making shell script
Top Forums Shell Programming and Scripting making shell script Post 302272678 by otheus on Wednesday 31st of December 2008 10:22:53 AM
Old 12-31-2008
After the dump, test the exit status of mysqldump.

Quote:
Originally Posted by kaushik02018
I made the script
Code:
# ... <excerpt>
mysqldump -u $USER -p$PASS $DB | gzip -9 >/home/backup/today_sme-$DATE.sql.gz  
if [ $? != 0 ]; then 
  echo Backup FAILED
  exit 1
fi
# ....

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Making a SOAP call from within unix shell scripts

Hi guys, Is it possible to make SOAP calls from within Unix shell scripts? I need to access a web service from within UNIX in order to lookup something while I am doing some parsing on a file. Regards, Laud (2 Replies)
Discussion started by: Laud12345
2 Replies

2. Shell Programming and Scripting

Need help making a script

Here is what I have: #!/bin/bash # Setup year date and month YR=`date +%Y '{print $6}'` MON=`date +%b '{print $2}'` DAY=`date +%d '{print $3}'` file=$YR$MOY$DOM # clear # Dump database using USER/PASS to ..sql mysqldump --user=me -ppass database > database-db.$file.sql The YR, MON and... (2 Replies)
Discussion started by: npereira
2 Replies

3. Shell Programming and Scripting

making script

hello experts cany any one help me i want to make one script which can rlogin to another machine . but it should not ask me username/password from me of another machine it should take the username and password from the script only. please help me out. regards, shary (2 Replies)
Discussion started by: shary
2 Replies

4. Shell Programming and Scripting

Problem in making shell script

Dear all Dear Brother I am bit new to programming or shell scripting. I have given one shell script which is regarding combining all the 240 or less files in a particular folderwhich is related to one hour of the day. There will be 24 these kind of folders related to a day . It means there... (4 Replies)
Discussion started by: girish.batra
4 Replies

5. Shell Programming and Scripting

Making file inside shell script

Hi, i have written a shell script and its working fine till now. Now, i have to enhance it with a small updation. i need to make a file inside my file that will contain the below parameters 1) Customer_id 2) Server_id 3) No. Account All the above variables are already been taken in... (3 Replies)
Discussion started by: dazdseg
3 Replies

6. Shell Programming and Scripting

shell script with decision making

Hi all I need help for the issue below. I need to create script: FORM_cmd=query || import FORM_command=add FORM_msisdn=389881234567 FORM_provcode=SK FORM_attr=12 FORM_cmd can be "query" or "import" when FORM_cmd="query" then execute -> spdci -cmd $FORM_cmd FORM_cmd when... (3 Replies)
Discussion started by: vasil
3 Replies

7. Shell Programming and Scripting

I could use some help with making a script

I run a small instrument lab. We track our user's time on the instruments with a very manual process of 'last wtmp.1' then cut/paste data into spreadsheets. My boss makes the initial spreadsheets then I convert and format them for uploading into our billing software (COReS). Cores is looking for a... (8 Replies)
Discussion started by: jpontius
8 Replies

8. Shell Programming and Scripting

Using shell scripting for making queries on postgres sql

I have a situation where I have a list of airplanes that make a series of flights. Therefore I am looking up the different flights that each airplane makes based on a postgres sql query: select flightid from plane where airplane='DELTAx' As a result I get a series of flight numbers... (0 Replies)
Discussion started by: JSNY
0 Replies

9. Shell Programming and Scripting

Need Help With making this script

Hello, im a new user on this site and learning scripting very slowly at a understanding pace. However i am up with a challenge and require help completing this. The script has to include arguments, variables, decisions and loops. So the script is about calculating the broadcast address for any... (5 Replies)
Discussion started by: tHe666
5 Replies

10. UNIX for Beginners Questions & Answers

Help me making this script

This script is executed whenever a new vehicle is added to the cycle-motor park of campus. The script asks for the following information about the car and adds a new line to the vehicle file.txt: name (name of an animal, unique identifier), color, mark, model, type (e.g., electrical, manual),... (2 Replies)
Discussion started by: andre2222
2 Replies
BACKUP_INTERACTIVE(8)					       AFS Command Reference					     BACKUP_INTERACTIVE(8)

NAME
       backup_interactive - Enters interactive mode

SYNOPSIS
       backup [interactive] [-localauth] [-cell <cell name>]
	   [-help]

       backup [i] [-l] [-c <cell name>] [-h]

DESCRIPTION
       The backup interactive initiates an interactive session for issuing backup commands. As indicated in the syntax statement, the operation
       code (interactive) is optional.

       Several features of interactive mode distinguish it from regular mode:

       o   In interactive mode, the "backup"> prompt replaces the system (shell) prompt. The operator enters only a command's operation code
	   (omitting the command suite name, backup).

       o   If the -localauth flag or the -cell argument is included on the backup interactive command, the settings apply to all commands issued
	   during that interactive session. The issuer does not need to type them on every command. Another consequence is that the flag and
	   argument do not appear in the syntax statement generated by the help subcommand or -help flag on an individual command issued at the
	   "backup"> prompt.

       o   The backup jobs and backup kill commands are available only in interactive mode. It is not possible to track and terminate backup
	   operations as cleanly in non-interactive mode.

       o   It is not necessary to enclose strings that include metacharacters in double quotes or other delimiters.

       o   The backup command interpreter establishes a connection to the Backup Server, Volume Server and Volume Location (VL) Server processes
	   as it enters interactive mode, and uses the same connection for all commands during the session. Execution time can therefore be faster
	   than in non-interactive mode, in which the command interpreter must establish a new connection for each command.

       To exit an interactive session, issue the backup quit command.

OPTIONS
       -localauth
	   Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. The backup command interpreter presents it to
	   the Backup Server, Volume Server and VL Server during mutual authentication. Do not combine this flag with the -cell argument. For more
	   details, see backup(8).

       -cell <cell name>
	   Names the cell in which to run the command. Do not combine this argument with the -localauth flag. For more details, see backup(8).

       -help
	   Prints the online help for this command. All other valid options are ignored.

EXAMPLES
       The following example shows how the -localauth flag and -cell argument do not appear when the help dump subcommand is issued in interactive
       mode.

	  % backup
	  backup> help dump
	  dump: start dump
	  Usage: dump [-volumeset <volume set name>] [-dump <dump level name>]
	  [-portoffset <TC port offset>] [-at <Date/time to start dump>+]
	  [-append ] [-n ] [-file <load file>] [-help ]

PRIVILEGE REQUIRED
       None. However, backup commands that require privilege in regular mode still require it in interactive mode.

SEE ALSO
       backup(8), backup_jobs(8), backup_kill(8), backup_quit(8), butc(8)

COPYRIGHT
       IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.

       This documentation is covered by the IBM Public License Version 1.0.  It was converted from HTML to POD by software written by Chas
       Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.

OpenAFS 							    2012-03-26						     BACKUP_INTERACTIVE(8)
All times are GMT -4. The time now is 05:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy