Sponsored Content
Top Forums Shell Programming and Scripting mysql script in a command shell Post 302547599 by itkamaraj on Tuesday 16th of August 2011 06:33:49 AM
Old 08-16-2011
read surnameINSERT into data

echo "Enter your dob"

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Mysql with shell script

Hi did any books teaching beginner to run mysql using BASH shell? thkx (5 Replies)
Discussion started by: lijiajin
5 Replies

2. Shell Programming and Scripting

executing mysql load statement from shell script

Hi, I have a piece of shell script which will connect to mysql database and execute a load statement(which will load datas in a file to the database table).The code is working and the data is in the tables. Now my requirement is, i need to grab the output from the load statement... (4 Replies)
Discussion started by: DILEEP410
4 Replies

3. Shell Programming and Scripting

Multiple MySql queries in shell script?

Hi guys, i know how to run a single query using mysql embedded in a shell script as follows: `mysql -umyuser -pmypass --host myhost database<<SQL ${query}; quit SQL` However, how would i be able to run several queries within the same connection? The reason for this is i am creating... (3 Replies)
Discussion started by: muay_tb
3 Replies

4. Shell Programming and Scripting

Passing a variable from shell script to mysql query?

I heard this was possible but from my research I haven't been able to figure it out yet. Seems it should be simple enough. Basically from a high level view I'm trying to accomplish... . $X='grep foo blah.log' then 'mysql command SELECT foo FROM bar WHERE ' . $X or something like that. ... (2 Replies)
Discussion started by: kero
2 Replies

5. Shell Programming and Scripting

while puting shell variable in mysql command value does not interpolate

port=$(ssh tms6@$x cat /tms6/scripts/start.lc.sh | grep -P '^\/tms6\/bin\/lc' | cut -d' ' -f3 | cut -b 3-6) tpsip=$(ssh tms6@$x cat /tms6/scripts/start.lc.sh | grep -P '^\/tms6\/bin\/lc' | cut -d' ' -f4 | cut -b 9-) # IFS="\n" set -- $port ... (1 Reply)
Discussion started by: rrd1986
1 Replies

6. Shell Programming and Scripting

Mysql command after a SSH connection (Script)

Hi all, Im new at scripting and i need to run a few commands at work every hours so i decide to make a script but on 1 of the steps i have a the follwoing problem: The command i do is this: #!/bin/bash ssh root@asdasd001 'mysql -h A-db-1 -uroot -password --execute "show slave status"'... (3 Replies)
Discussion started by: Aparicio
3 Replies

7. Shell Programming and Scripting

Using a shell script variable in a mysql query using 'LIKE'

Hello. I am writing a simple script that reads a text file and removes records from a mysql database. The items in the text file are of the format: firstname.middle.lastXXX, where XXX is a 3 digit number. The table has an email field that will match the firstname.middle.last. So, I thought I... (1 Reply)
Discussion started by: bricoleur
1 Replies

8. Shell Programming and Scripting

mysql script in a command shell

Hi can anyone help with my issue here. I new in linux and new in scripting. i was ask to do the following below and i`m getting errors. I managed to create the table and the database. Now i need to add the details in a shell to update the database.... (7 Replies)
Discussion started by: mduduzi
7 Replies

9. Shell Programming and Scripting

Shell script - Download - Mysql replace

Hi, I have a video script. it has embedded Youtube videos. I want replace them downloaded version mp4 videos. this script has a mysql table. I want search "url_flv" field on table a youtube link if has a youtube link I want download it this command. I want extract uniq_id field for file... (2 Replies)
Discussion started by: tara123
2 Replies

10. Shell Programming and Scripting

Mysql is not working in shell script

Hi Team, I have created attached script in mysql environment. But there is below error . can you please suggest . Error : Unknown table 'processlist' in finformation_schema #!/bin/bash mysql -u $DBUSER -p$DBPASS -e " select -- * id from information_schema.processlist where... (1 Reply)
Discussion started by: Jewel
1 Replies
SERVICE(8)						    BSD System Manager's Manual 						SERVICE(8)

NAME
service -- control (start/stop/etc.) or list system services SYNOPSIS
service -e service -R service [-v] -l | -r service [-v] <rc.d script> start|stop|etc. DESCRIPTION
The service command is an easy interface to the rc.d system. Its primary purpose is to start and stop services provided by the rc.d scripts. When used for this purpose it will set the same restricted environment that is in use at boot time (see below). It can also be used to list the scripts using various criteria. The options are as follows: -e List services that are enabled. The list of scripts to check is compiled using rcorder(8) the same way that it is done in rc(8), then that list of scripts is checked for an "rcvar" assignment. If present the script is checked to see if it is enabled. -R Restart all enabled local services. -l List all files in /etc/rc.d and the local startup directories. As described in rc.conf(5) this is usually /usr/local/etc/rc.d. All files will be listed whether they are an actual rc.d script or not. -r Generate the rcorder(8) as in -e above, but list all of the files, not just what is enabled. -v Be slightly more verbose ENVIRONMENT
When used to run rc.d scripts the service command sets HOME to / and PATH to /sbin:/bin:/usr/sbin:/usr/bin which is how they are set in /etc/rc at boot time. EXIT STATUS
The service utility exits 0 on success, and >0 if an error occurs. EXAMPLES
The following are examples of typical usage of the service command: service named status service -rv The following programmable completion entry can be use in bash(1) for the names of the rc.d scripts: _service () { local cur cur=${COMP_WORDS[COMP_CWORD]} COMPREPLY=( $( compgen -W '$( service -l )' -- $cur ) ) return 0 } complete -F _service service SEE ALSO
bash(1) (ports/shells/bash), rc.conf(5), rc(8), rcorder(8) HISTORY
The service utility first appeared in FreeBSD 7.3. AUTHORS
This manual page was written by Douglas Barton <dougb@FreeBSD.org>. BSD
December 11, 2012 BSD
All times are GMT -4. The time now is 12:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy