11-03-2009
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
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
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
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
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
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
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
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
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
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
LEARN ABOUT FREEBSD
rmdir
RMDIR(1) BSD General Commands Manual RMDIR(1)
NAME
rmdir -- remove directories
SYNOPSIS
rmdir [-pv] directory ...
DESCRIPTION
The rmdir utility removes the directory entry specified by each directory argument, provided it is empty.
Arguments are processed in the order given. In order to remove both a parent directory and a subdirectory of that parent, the subdirectory
must be specified first so the parent directory is empty when rmdir tries to remove it.
The following option is available:
-p Each directory argument is treated as a pathname of which all components will be removed, if they are empty, starting with the last
most component. (See rm(1) for fully non-discriminant recursive removal.)
-v Be verbose, listing each directory as it is removed.
EXIT STATUS
The rmdir utility exits with one of the following values:
0 Each directory entry specified by a directory operand referred to an empty directory and was removed successfully.
>0 An error occurred.
EXAMPLES
Remove the directory foobar, if it is empty:
$ rmdir foobar
Remove all directories up to and including cow, stopping at the first non-empty directory (if any):
$ rmdir -p cow/horse/monkey
SEE ALSO
rm(1)
STANDARDS
The rmdir utility is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible.
HISTORY
A rmdir command appeared in Version 1 AT&T UNIX.
BSD
March 15, 2013 BSD