answersLogoWhite

0

The basic format is mysql (any mysql options) < sql_script_you_want_to_run.sql for mysql, and psql (any psql options) < sql_script_you_want_to_run.sql for postgresql.

User Avatar

Wiki User

18y ago

What else can I help you with?

Related Questions

Which command in unix is used to run the script immediately?

As long as the script file is readable and executable, just type the name of the script and it will execute immediately. Otherwise, you can call the shell interpreter and have it run it immediately such as: bash ./thefile where ./thefile is the script you want to run. Or, substitute the shell interpreter you wish to use instead of bash, such as sh, ksh, tcsh, csh, etc.


How do you run a Unix program?

By typing its name into the shell


Where can you get a Unix shell for Windows?

A Unix shell can be obtained in Cygwin, a Unix compatibility layer used to compile Unix programs and run them on Windows. Microsoft also makes a shell known as "Windows PowerShell" which incorporates more Unix-like features than the standard command prompt.


What is the command to execute a shell script?

If the shell script is readable and executable then to execute it just type the name of the shell script file. Otherwise, you can explicity call a shell interpreter to run the file as a shell script, i.e., ksh myfile


Can you execute a shell script if you do not have read permission for the file containing the script?

No, the shell needs both execute and read permissions to run the script.


What do you mean by shell and shell scripts?

Shell scripts are interpreted files that contain commands and logic sequences to do things. They are similar to programs in that they contain logic and sequencing, and call other programs to accomplish tasks. You use shell scripts to automate tasks in Unix, run tasks periodically, create repeatable tasks, etc.


How do you compile and run shell script of factorial?

Shell scripts are not compiled; they are interpreted (and therefore do not need to be compiled). Just type in the name of the shell script and any parameters it needs to execute.


What line is necessary at the beginning of a script to tell the OS what to use to run the script?

The special line at the beginning of the script is only necessary if you want the script to be run by a certain command interpreter that is different from your logon shell or because you don't know what environment the user of the shell might be running in. It is a special comment line that looks like: #!/command-name such as: #!/usr/bin/ksh which causes the ksh interpreter to be used for the rest of the shell script.


How do you write a shell script to enlist the processes being run?

#!/bin/sh PS -a


What are the difference between su and su-aloke in UNIX OS?

su substitute user.. and su is a unix command used to run the shell of another user without logging off..


Can you run Unix commands in uppercase?

On the off chance that the name of the binary / script is in uppercase, yes. But "ifconfig", "Ifconfig", and "IFCONFIG" are treated as three separate programs.


What is the three categories of users in a Unix environment?

Unix has the following categories of users: Superuser - root account, can do anything on the system ordinary user - has no special privileges restricted user - is restricted in what they can do in the shell and programs they can run.