Sponsored Content
Top Forums Programming Improve my shell by adding hierarchical directories. Post 302367149 by evantheking on Sunday 1st of November 2009 02:24:54 PM
Old 11-01-2009
fixed the link
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Adding -options to shell scripts

I'm sure this is something simple I am overlooking somehow. I'd like the ability to pass -options into my shell scripts. For example my file called "input.sh" I can do the following: root# ./input.sh 1 and it will result: root#./input.sh 1 You passed me a 1 Just like an init script, etc.... (4 Replies)
Discussion started by: sysera
4 Replies

2. Shell Programming and Scripting

Adding options to a shell script

I want to add options to my shell script but having problems, my code so far is; #!/bin/bash lflag= iflag= while getopts 'l:i:' OPTION do case $OPTION in l) lflag=1 lval="$OPTARG" ;;... (1 Reply)
Discussion started by: paulobrad
1 Replies

3. Shell Programming and Scripting

Help with Shell Script displaying Directories

I am new to shell programming and have an assignment question which requires me to list the contents of the present working directory in 4 column format and highlight any subdirectories. It then requires me to develop the shell script to accept a directory name as a positional parameter (if no... (11 Replies)
Discussion started by: cjnd1988
11 Replies

4. Shell Programming and Scripting

Improve the performance of a shell script

Hi Friends, I wrote the below shell script to generate a report on alert messages recieved on a day. But i for processing around 4500 lines (alerts) the script is taking aorund 30 minutes to process. Please help me to make it faster and improve the performace of the script. i would be very... (10 Replies)
Discussion started by: apsprabhu
10 Replies

5. Shell Programming and Scripting

dynamically adding values in c-shell

I am needing to create a variable(changing) and assign it a value(changing) ... I am using C-Shell.. Example: foreach account in ($Accountlist) set account_connect = "$account/$account_pass" end I want to make set account_connect to store various values ? $account_connect did not... (3 Replies)
Discussion started by: shafi2all
3 Replies

6. Shell Programming and Scripting

renaming directories with shell script

Hi All after looking around the website and various other resources I become stuck. I'm trying to rename directories from Firstname Initial Lastname to lastname,_firstname_initial so far ive got for f in {./} do rename -n 'y/A-Z/a-z/' * rename -n 's/\ /_/g' * ... (2 Replies)
Discussion started by: harlequin
2 Replies

7. UNIX for Dummies Questions & Answers

[please] improve my shell/SQL*Plus script

Hi We generate with PL/SQL *.csv files, archive them and mail to the customer. Here is my script (Solaris 10, ksh): #!/bin/ksh # Unix Shell Script Structure for PL/SQL queries with SQL*Plus . ~/.profile scriptdir=/opt/ora/scripts queryname1=example... (1 Reply)
Discussion started by: slashdotweenie
1 Replies

8. Shell Programming and Scripting

Parse Hierarchical line

Hi, I have one Hierarchical text file. Content shown below 01|abcd|vbgh 02|test1|test2|testx 02|test23|test343|ddfd45 03|7676|8787|8989 01|bcdf|hjc 02|testds|sddsf|sdfdsf 03|sdfsd|sdfsdf|sfsd 03|ssdfdsf|sdsdfsdfds|sdfsf 02|sdfdf|sddsfs|sdfsdf ... (1 Reply)
Discussion started by: Anupam_Halder
1 Replies

9. HP-UX

Adding Directories to PATH in HP-UX with csh

HI Guys, I am truing to add some directories to the productive HP-UX (like /usr/sbin) the problem is that i tried some methods like (export) and setenv but i failed. I add some logs output of the commands to provide you with more info . the user which I am trying to add this path is different... (5 Replies)
Discussion started by: barry1946
5 Replies

10. Shell Programming and Scripting

Adding Two Array in shell script

Hi Experts, I've got this problem where I need to add two array in shell script such that that is an element is greater than 9 then it get further split into individual digit, something like below : Input :- array1=(2 6 8 9 10 12) array2=(5 4 6 8 12 14) Output :- array3=(7 1 0 1 4 1 7 2 2... (8 Replies)
Discussion started by: mukulverma2408
8 Replies
MKDIR(1)						    BSD General Commands Manual 						  MKDIR(1)

NAME
mkdir -- make directories SYNOPSIS
mkdir [-pv] [-m mode] directory_name ... DESCRIPTION
The mkdir utility creates the directories named as operands, in the order specified, using mode ``rwxrwxrwx'' (0777) as modified by the cur- rent umask(2). The options are as follows: -m mode Set the file permission bits of the final created directory to the specified mode. The mode argument can be in any of the formats specified to the chmod(1) command. If a symbolic mode is specified, the operation characters '+' and '-' are interpreted relative to an initial mode of ``a=rwx''. -p Create intermediate directories as required. If this option is not specified, the full path prefix of each operand must already exist. On the other hand, with this option specified, no error will be reported if a directory given as an operand already exists. Intermediate directories are created with permission bits of ``rwxrwxrwx'' (0777) as modified by the current umask, plus write and search permission for the owner. -v Be verbose when creating directories, listing them as they are created. The user must have write permission in the parent directory. EXIT STATUS
The mkdir utility exits 0 on success, and >0 if an error occurs. EXAMPLES
Create a directory named foobar: $ mkdir foobar Create a directory named foobar and set its file mode to 700: $ mkdir -m 700 foobar Create a directory named cow/horse/monkey, creating any non-existent intermediate directories as necessary: $ mkdir -p cow/horse/monkey COMPATIBILITY
The -v option is non-standard and its use in scripts is not recommended. SEE ALSO
rmdir(1) STANDARDS
The mkdir utility is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible. HISTORY
A mkdir command appeared in Version 1 AT&T UNIX. BSD
March 15, 2013 BSD
All times are GMT -4. The time now is 12:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy