Sponsored Content
Top Forums Shell Programming and Scripting Help with script to create users from database query Post 302744981 by RudiC on Sunday 16th of December 2012 06:10:20 AM
Old 12-16-2012
Your code looks OK. Pls run the script with the -vx options set and post the result.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script to create users on many servers

Hi all, working on script to create a user acct on all our servers. for i in `cat $host_file`; do ssh $i /usr/bin/sudo /usr/bin/mkuser id='bpadm' gecos='NetBackup Admin' 2>&1 >> $log done error i get is: 3004-692 Error changing "id" to "bpadm" : Value is invalid. I have tried this in... (1 Reply)
Discussion started by: dnidiffer
1 Replies

2. OS X (Apple)

interactive shell script to create users 10.4

Hello everyone, Not sure if this is the right place, but OS X isn't your standard Unix, so I figured here would be best. I am looking at creating a script that will be interactive that admins can run to create users. Now, 10.4 uses netinfo database and netinfo manager to handle it's users. ... (3 Replies)
Discussion started by: tlarkin
3 Replies

3. Shell Programming and Scripting

Tables to query to find users for database from shell script

I am coding shell script. I need to connect to different databases like DB2, Oracle and Sybase. I would then need to query tables where it has all the groups, users for that database. I would also need who has what kind of permissions. EG: I know for DB2 some TABAUTH table needs to be... (0 Replies)
Discussion started by: pinnacle
0 Replies

4. Shell Programming and Scripting

Create mysql database with bash script - confused

Hi, i have the following: db="create database xxx;GRANT ALL PRIVILEGES ON xxx.* TO user@localhost IDENTIFIED BY 'password';FLUSH PRIVILEGES;quit;" mysql -u root -p$mysql_pass -e "$db" I don't understand why this is failing, it works fine when run from cmd but when is run in a bash script,... (1 Reply)
Discussion started by: ktm
1 Replies

5. Shell Programming and Scripting

Create new users in DMZ box using script

I remote to many DMZ boxes every day to run batch file that allows me to create users. I create users in 17 DMZ boxes every day which takes a lot of my time. Is there any script that would do this job from my local computer? Thank you for your help! (3 Replies)
Discussion started by: idiazza
3 Replies

6. Shell Programming and Scripting

How to run a SQL select query in Oracle database through shell script?

I need to run a SQL select query in Oracle database and have to capture the list of retrieved records in shell script. Also i would like to modify the query for certain condition and need to fetch it again. How can i do this? Is there a way to have a persistent connection to oracle database... (9 Replies)
Discussion started by: vel4ever
9 Replies

7. Shell Programming and Scripting

Korn Script to connect and query oracle database

I've been sent the following script to finish. It's supposed to connect to an oracle database, query it, and send an email if the query result value is one or more. Currently it isn't connecting properly, just giving the following error: ERROR: ORA-01017: invalid username/password; logon denied... (2 Replies)
Discussion started by: jackmorgan2007
2 Replies

8. Programming

Creating a bash script that create/open database

Hi. I have two text files(tables) which include some information and I want to make some query codes using them. First of all, I want to create bash script that read this two tables, create/open database and insert data from files into database. #!/bin/bash while read line; do ... (1 Reply)
Discussion started by: rlaxodus
1 Replies

9. UNIX and Linux Applications

Really simple shell script to create oracle database

Hello , I am new in this forum and need your help as I am totally confused :confused: I read a lot of threads and tried to search a lot but did not get the exact answer to my question. I just want a simple (content wise may be long) shell script to create oracle database. In detail:... (5 Replies)
Discussion started by: rahoolm
5 Replies

10. Shell Programming and Scripting

Create users from a text file by script

Hi All, I am new to scripting, i want to create one script in which i can add users from a text file, assign them a default password like 123456. It should be like: Username= $i (it should take users from text file one by one) Password : 123456(default for every user) (1 Reply)
Discussion started by: prad_rocxx
1 Replies
GOSH(1) 							  Gauche Commands							   GOSH(1)

NAME
gosh - a Scheme script interpreter SYNOPSIS
gosh [-biqV] [-I path ] [-A path ] [-u module ] [-l file ] [-e expr ] [-E expr ] [-f flag ] [--] [ script argument ... ] DESCRIPTION
Gosh is a stand-alone Scheme interpreter built on top of the Gauche Scheme script engine. When script is given, gosh loads the script, evaluating Scheme code in it. Then, if the script defines a procedure named main, gosh calls it with a single argument which is a list of the script name and subsequent arguments. When main returns an integer value, gosh exits with it as an exit code. If main returns non-integer value, or an error is signaled during evaluation, gosh exits with exit code 70 (EX_SOFT- WARE). See SRFI-22 (http://srfi.schemers.org/srfi-22/srfi-22.html) for details. If there's no main procedure defined in the script, gosh exits with code 0 after loading the script file. If no script file is given, gosh goes into an interactive mode. By default, gosh prompts the user to enter a Scheme expression, read and evaluates it, then prints the result, until EOF is read. If the standard input is not a terminal, however, gosh doesn't print a prompt; it allows a user to use gosh as a filter program. This behavior can be controlled by -i or -b option; see below. OPTIONS
Command line options are processed before loading the script file or entering the interactive mode. The options -I, -A, -u, -l, -L, -e and -E are processed in the order of appearance. For example, adding a load path by -I option affects the -l options after it, but not the ones before it. -V Prints gosh version and exits. -b Batch mode. Doesn't print prompt even the standard input is a terminal. Supersedes -i. -i Interactive mode. Forces to print prompt, even the standard input is not a terminal. -q Prevents reading the default initialization file. -Ipath Adds path in front of the load path list. -Apath Appends path to the tail of the load path list. -umodule Loads and imports module, as if "(use module )" is specified in the code. -lfile Loads a Scheme file file. -Lfile Like -l, but doesn't complain if file doesn't exist. -eexpr Evaluates a Scheme expression expr. -Eexpr Same as -e, except that the expr is read as if it is surrounded by parenthesis. -ptype Turns on the profiler. Currently type can only be 'time'. -fflag Sets various flags. case-fold uses case-insensitive reader (as in R5RS) load-verbose report while loading files no-inline don't inline primitive procedures and constants (combined no-inline-globals, no-inline-locals, and no-inline-constants.) no-inline-globals don't inline global procedures. no-inline-locals don't inline local procedures. no-inline-constants don't inline constants. no-post-inline-pass don't run post-inline optimization pass. -Ffeature Makes feature available in cond-expand forms. -- Specifies that there are no more options. If there are more arguments after this, they are taken as script file name and its argu- ments. ENVIRONMENT
GAUCHE_LOAD_PATH A colon separated list of the load paths. The paths are appended before the system default load paths. GAUCHE_DYNLOAD_PATH A colon separated list of the load paths for dynamically loaded objects. The paths are appended before the system default load paths. AUTHORS
Shiro Kawai (shiro @ acm . org) SEE ALSO
gauche-config(1) Gauche Scheme script engine: http://practical-scheme.net/gauche/ For the information about Scheme language, see http://www.schemers.org/ Gauche 0.9.1 GOSH(1)
All times are GMT -4. The time now is 08:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy