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)
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)
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)
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)
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)
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)
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)
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)
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 REDHAT
rmdir
RMDIR(2) Linux Programmer's Manual RMDIR(2)NAME
rmdir - delete a directory
SYNOPSIS
#include <unistd.h>
int rmdir(const char *pathname);
DESCRIPTION
rmdir deletes a directory, which must be empty.
RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
ERRORS
EPERM The filesystem containing pathname does not support the removal of directories.
EFAULT pathname points outside your accessible address space.
EACCES Write access to the directory containing pathname was not allowed for the process's effective uid, or one of the directories in
pathname did not allow search (execute) permission.
EPERM The directory containing pathname has the sticky-bit (S_ISVTX) set and the process's effective uid is neither the uid of the file to
be deleted nor that of the directory containing it.
ENAMETOOLONG
pathname was too long.
ENOENT A directory component in pathname does not exist or is a dangling symbolic link.
ENOTDIR
pathname, or a component used as a directory in pathname, is not, in fact, a directory.
ENOTEMPTY
pathname contains entries other than . and .. .
EBUSY pathname is the current working directory or root directory of some process.
ENOMEM Insufficient kernel memory was available.
EROFS pathname refers to a file on a read-only filesystem.
ELOOP Too many symbolic links were encountered in resolving pathname.
CONFORMING TO
SVr4, SVID, POSIX, BSD 4.3
BUGS
Infelicities in the protocol underlying NFS can cause the unexpected disappearance of directories which are still being used.
SEE ALSO rename(2), mkdir(2), chdir(2), unlink(2), rmdir(1), rm(1)Linux 0.99.7 1993-07-24 RMDIR(2)