Sponsored Content
Top Forums Shell Programming and Scripting How to write bash script for creating user on multiple Linux hosts? Post 302771445 by DGPickett on Wednesday 20th of February 2013 04:11:19 PM
Old 02-20-2013
One way to avoid grief is to put everything in ', except ' itself and $varaibles and file globs. For $variable, you nip out of ' land and into " land for the variable and then go back to ' land. ' itself is '"'"' or '\'' file globs must be barefoot.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Creating user ids on multiple systems simultaneously

I am trying to think of a way to create user ids on multiple Linux systems in one fell swoop without logging onto each system indivually. Is there a way to do this with ssh commands? I don't want to use NIS/LDAP solution just a simple shell script utilitarian methodoloy would suffice. Also, I am... (1 Reply)
Discussion started by: darthur
1 Replies

2. UNIX for Dummies Questions & Answers

[LINUX] Creating new user accounts

I've had Linux when I was young, on one of our first computers and learned it pretty quickly... However, I've been working on Windows for about 7 years now and just made the switch back to Linux, Mandrake 9.1. So I have some problem with creating new user accounts. I could create one, but once I... (3 Replies)
Discussion started by: Arendo
3 Replies

3. Shell Programming and Scripting

script for df output from multiple hosts

I am trying get "df -k" output from multiple hosts along with their hostnames via ssh, my script is appending the "df -k" output from all the nodes to a single file but not getting the hostnames for those nodes, just wondering how to pass more than one command via ssh or may be someone could come... (6 Replies)
Discussion started by: barkath
6 Replies

4. Shell Programming and Scripting

How to write bash script to explode multiple zip files

I have a directory full of zip files. How would I write a bash script to enumerate all the zip files, remove the ".zip" from the file name, create a directory by that name and unzip each zip file into its corresponding directory? Thanks! Siegfried (3 Replies)
Discussion started by: siegfried
3 Replies

5. Shell Programming and Scripting

help needed with creating challenging bash script with creating directories

Hi, Can someone help me with creating a bash shell script. I need to create a script that gets a positive number n as an argument. The script must create n directories in the current directory with names like map_1, map_2 etcetera. Each directory must be contained within its predecessor. So... (7 Replies)
Discussion started by: I-1
7 Replies

6. SuSE

creating user on SUSE Linux

Hi I need to create a user who can have access on only one folder. for example I created a user "test" . he should have access only on folder /testfolder. The problem is that the user will mostly use FileZilla to ftp his files in the testfolder. In the fileZilla , i want him to be... (21 Replies)
Discussion started by: SystemEng
21 Replies

7. Shell Programming and Scripting

script to reboot multiple hosts

Hi Expert, How to create a script to reboot multiple hosts in linux? Thank you. (5 Replies)
Discussion started by: regmaster
5 Replies

8. Shell Programming and Scripting

Running a script on multiple remote hosts at once

I have a script on about 15 hosts that I need to run for each host whenever I want (not crontab). Problem is, this script takes 5-10 mins to run for each host. Is there a way I can run the script in parallel for all the hosts instead of 1 at a time? Also, I'm remotely running the script on the... (3 Replies)
Discussion started by: mrskittles99
3 Replies

9. Shell Programming and Scripting

Bash script to detect nonpingable hosts

I have a script to detect if a host is pingable or not. The problem is that I would like it to put the nonpingable hosts in one file and the pingable hosts in another. I have come up with this so far: for ip in `cat /tmp/testlist2`; do ping -c 3 $ip >/dev/null && echo "$ip is up" || echo "$ip... (5 Replies)
Discussion started by: newbie2010
5 Replies

10. Shell Programming and Scripting

Check connectivity with multiple hosts - BASH script available here

Hi everyone! Some time ago, I had to check connectivity with a big list of hosts, using different formats (protocol://server:port/path/, server:port, ....). I developed a script that checks the connectivity using different commands (ping, telnet, nc, curl). It worked for me so I'm sharing it... (9 Replies)
Discussion started by: Fr3dY
9 Replies
DBADB(1)						      General Commands Manual							  DBADB(1)

NAME
dbadb - Manage the DB-ALLe database SYNOPSIS
dbadb [command] [options] [args...] DESCRIPTION
It allows to initialise the database, dump its contents and import and export data using BUFR, CREX or AOF encoding. dbadb always requires a non-switch argument, that indicates what is the operation that should be performed: help Print a help summary. help manpage Print this manpage. dump [options] [queryparm1=val1 [queryparm2=val2 [...]]] Dump data from the database. Query parameters are the same of the Fortran API. Please see the section "Input and output parameters -- For data related action routines" of the Fortran API documentation for a complete list.. wipe [options] [optional rep_memo description file] Reinitialise the database, removing all data. Reinitialisation is done using the given report code description file. If no file is provided, a default version is used. import [options] [filter] filename [filename [ ... ] ] Import data into the database. export [options] rep_memo [queryparm1=val1 [queryparm2=val2 [...]]] Export data from the database. Query parameters are the same of the Fortran API. Please see the section "Input and output parame- ters -- For data related action routines" of the Fortran API documentation for a complete list.. repinfo [options] [filename] Update the report information table. Update the report information table with the data from the given report code description file. If no file is provided, a default version is used. cleanup [options] Perform database cleanup operations. The only operation currently performed by this command is deleting stations that have no val- ues. If more will be added in the future, they will be documented here.. stations [options] [queryparm1=val1 [queryparm2=val2 [...]]] List the stations present in the database. Query parameters are the same of the Fortran API. Please see the section "Input and out- put parameters -- For data related action routines" of the Fortran API documentation for a complete list.. delete [options] [queryparm1=val1 [queryparm2=val2 [...]]] Delete all the data matching the given query parameters. Query parameters are the same of the Fortran API. Please see the section "Input and output parameters -- For data related action routines" of the Fortran API documentation for a complete list.. OPTIONS
dbadb follows the usual GNU command line syntax, with long options starting with two dashes (`-'). Options used to connect to the database --dsn=dsn DSN, or URL-like database definition, to use for connecting to the DB-All.e database (can also be specified in the environment as DBA_DB) --user=user username to use for connecting to the DB-All.e database --pass=pass password to use for connecting to the DB-All.e database --wipe-first wipe database before any other action Options used to filter messages --category=num match messages with the given data category --subcategory=num match BUFR messages with the given data subcategory --check-digit=num match CREX messages with check digit (if 1) or without check digit (if 0) --unparsable match only messages that cannot be parsed --parsable match only messages that can be parsed --index=expr match messages with the index in the given range (ex.: 1-5,9,22-30) Option for command dump -?, --help print an help message --verbose verbose output Option for command wipe -?, --help print an help message --verbose verbose output Option for command import -?, --help print an help message --verbose verbose output -t type, --type=type format of the input data ('bufr', 'crex', 'aof', 'csv') -f, --overwrite overwrite existing data -r rep, --report=rep force data to be of this type of report, specified with rep_cod or rep_memo values --fast Ignored. This option is left here for compatibility with old versions of dbadb. --no-attrs do not import data attributes --full-pseudoana merge pseudoana extra values with the ones already existing in the database --precise import messages using precise contexts instead of standard ones Option for command export -?, --help print an help message --verbose verbose output -r rep, --report=rep force exported data to be of this type of report, specified with rep_cod or rep_memo values -d type, --dest=type format of the data in output ('bufr', 'crex', 'aof') -t name, --template=name template of the data in output (autoselect if not specified, 'list' gives a list) --dump dump data to be encoded instead of encoding it Option for command repinfo -?, --help print an help message --verbose verbose output Option for command cleanup -?, --help print an help message Option for command stations -?, --help print an help message Option for command delete -?, --help print an help message TEMPLATE NAMES
This is a list of possible template names for the --template switch: acars ACARS (autodetect) acars-ecmwf ACARS ECMWF (4.145) acars-wmo ACARS WMO airep AIREP (autodetect) airep-ecmwf AIREP ECMWF (4.142) amdar AMDAR (autodetect) amdar-ecmwf AMDAR ECMWF (4.144) amdar-wmo AMDAR WMO buoy Buoy (1.21) generic Generic (255.0) metar Metar (0.140) pilot Pilot (2.91) pollution Pollution (8.171) ship Synop ship (autodetect) ship-abbr Synop ship (abbreviated) (1.9) ship-auto Synop ship (auto) (1.13) ship-plain Synop ship (normal) (1.11) ship-reduced Synop ship (reduced) (1.19) synop Synop (autodetect) synop-ecmwf Synop ECMWF (autodetect) (0.1) synop-ecmwf-auto Synop ECMWF land auto (0.3) synop-ecmwf-land Synop ECMWF land (0.1) synop-ecmwf-land-high Synop ECMWF land high level station (0.1) synop-wmo Synop WMO (0.1) temp Temp (autodetect) temp-ecmwf Temp ECMWF (autodetect) temp-ecmwf-land Temp ECMWF land (2.101) temp-ecmwf-ship Temp ECMWF ship (2.102) temp-ship Temp ship (autodetect) temp-wmo Temp WMO (2.101) wmo WMO style templates (autodetect) --template=list will also print the list. AUTHOR
dbadb has been written by Enrico Zini <enrico@enricozini.com> for ARPA Emilia Romagna, Servizio Idrometeorologico. may 16, 2012 DBADB(1)
All times are GMT -4. The time now is 09:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy