Sponsored Content
Top Forums Programming Improve my shell by adding hierarchical directories. Post 302367757 by drl on Tuesday 3rd of November 2009 11:04:07 AM
Old 11-03-2009
Hi.

File V7/usr/src/cmd/sh/xec.c contains:
Code:
				case SYSCD:
					IF flags&rshflg
					THEN	failed(com[0],restricted);
					ELIF (a1==0 ANDF (a1=homenod.namval)==0) ORF chdir(a1)<0
					THEN	failed(a1,baddir);
					FI
					break;

The mkdir command is usually a program external to the shell.

Good luck ... cheers, drl
 

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
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)
All times are GMT -4. The time now is 05:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy