creating multiple sub-/directories using a shell script
0
Hi,
I am looking for a way of creating multiple directories using the mkdir -p command in a shell script.
I'm working with an Ubuntu machine and try to do something like that:
#!/bin/sh
# Create required directories to support pipelines (BWAse, BWApe, and others to come...)
I would like to have each of the directories in the {} as sub-directories of the directory before.
The problem is that I get only one directory with the complete name inclusive the {}.
It looks like that:
What am doing wrong? Is there a way of automating this procedure?
Thanks
Assa
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)
Hello
I have a directory structure with year in format 4 digits, e.g 2009, below which is month format 1 or 2 digits, e.g 1 or 12, blow which is day format 1 or 2 digits, e.g 1 or 31.
I want to change the names of lots of directories to the be
Year - 4 digits , e.g 2009 - No change here... (4 Replies)
I have one parent directory and within that parent directory there are several other sub-directories and within those sub-directories there are several other "large number" of sub-directories.
All the sub directories have a shell script in them with a common file name execute_command.sh I want... (4 Replies)
Hi,
Very unfamiliar with unix/linux stuff. Our admin is on vacation so, need help very quickly.
I have directories (eg 40001, 40002, etc) that each have one subdirectory (01).
Each subdir 01 has multiple subdirs (001, 002, 003, etc). They are same in each dir.
I need to keep the top and... (7 Replies)
Hi ,
I want a script to create a directories at different locations.
suppose i am on home/path/zone1. I want to create a directory of current month in this location.
Then i want to create the same current month directory in home/path/zone2.like this for 9 diffrent zones.
I can do this... (4 Replies)
how can i move "dataName".sql.gz into a folder called 'database' and then move "$fileName".tar.gz * .htaccess into a folder called 'www' with the entire gzipped file being "$fileName".tar.gz? Is this doable or overly complex.
so
mydemo--2015-03-23-1500.tar.gz
> database
-... (5 Replies)
for UserName in `cat users` ; do useradd -d /u02 -s /usr/libexec/openssh/sftp-server -G ftp-users $UserName ;
PassWord=$( echo $( tr '' '' <<< ${UserName:0:1} )${UserName:1} ) ;
echo "$PassWord@123" | passwd $UserName --stdin ; done
can some one explain what the bold text do
Please use... (5 Replies)
I've got this script to loop through all folders and move files that are more than 2 years old. I'm using the install command because it creates the necessary directories on the destination path and then I remove the source. I'd like to change the script to use the mv command since it is much... (4 Replies)
Hi All,
I am new in scripting and working in a project where we have RSyslog servers over CentOS v7 and more than 200 network devices are sending logs to each RSyslog servers. For each network devices individual folders create on the name of the each network devices IP addresses.The main... (7 Replies)
Hello everyone,
First of all this is my first post and im fairly new to working with Unix and creating scripts etc. so there will probably be wrong phrases used.
Lets get to my questions.
I have multiple scripts that submit Slurms/Jobs to the cluster starting like this and doing certain... (3 Replies)
Discussion started by: idbemad
3 Replies
LEARN ABOUT REDHAT
drop_user
DROP USER(7) SQL Commands DROP USER(7)NAME
DROP USER - remove a database user account
SYNOPSIS
DROP USER name
DESCRIPTION
DROP USER removes the specified user from the database. It does not remove tables, views, or other objects owned by the user. If the user
owns any database, an error is raised.
PARAMETERS
name The name of an existing user.
DIAGNOSTICS
DROP USER
The message returned if the user is successfully deleted.
ERROR: DROP USER: user "name" does not exist
This message occurs if the user name is not found.
DROP USER: user "name" owns database "name", cannot be removed
You must drop the database first or change its ownership.
NOTES
Use CREATE USER [create_user(7)] to add new users, and ALTER USER [alter_user(7)] to change a user's attributes. PostgreSQL includes a
program dropuser [dropuser(1)] that has the same functionality as this command (in fact, it calls this command) but can be run from the
command shell.
EXAMPLES
To drop a user account:
DROP USER jonathan;
COMPATIBILITY
The DROP USER statement is a PostgreSQL extension. The SQL standard leaves the definition of users to the implementation.
SEE ALSO
CREATE USER [create_user(7)], ALTER USER [alter_user(l)], dropuser(1)SQL - Language Statements 2002-11-22 DROP USER(7)