Sponsored Content
Full Discussion: Cd error terminating loop
Top Forums Shell Programming and Scripting Cd error terminating loop Post 302552232 by ajaincv on Friday 2nd of September 2011 04:40:20 AM
Old 09-02-2011
Cd error terminating loop

Hi All,

I am trying to make a small shell script.In this it will got directory as per variable & run the find command on that directory.There are 120 + directories & not sure all of them are mounted.So the issue is if the directory doesent exists my loops gets terminated. so is there any was that it just show me the error & continue looping.
All the directories are on root FS.I have specified all the directires in a file /tmp/filer1

##########################
Code:
while read inputline
do
   cd $inputline
#pwd
    find . -size 0 -type l -exec ls -l {} \;>>/mot/systems/filer_bug/$inputline&
done</tmp/filer1

############################
Output
############################
Code:
maruti# cd /fil01vol18_ata
/fil01vol18_ata: No such file or directory
maruti# pwd

##############################

Best Regards

Ankit

Last edited by Franklin52; 09-02-2011 at 10:17 AM.. Reason: Please use code tags for code and data samples, thank you
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Terminating myself

just like what the subject said but the ip is different example if now my IP is 192.168.0.50 and my name is seed if i wanna terminate 192.168.0.55 with the same nick of mine, seed can i do that ?? and what is the command ?? (2 Replies)
Discussion started by: SeeD
2 Replies

2. Shell Programming and Scripting

terminating script with CTRL+D

Hi, I'm trying to make a script that reads the console input and terminates with CTRL+D. It's absolutely basic but I don't know how to "read" the CTRL+D. I've tried a bunch of things like EOT=^D while //with & without quotations do read input echo $input done while while ] ... (12 Replies)
Discussion started by: sanchopansa
12 Replies

3. UNIX for Dummies Questions & Answers

Terminating child script with terminating the parent script

Hi I was working on a shell script with randomly shows a page of text from a randomly selected topic .As soon as the page is displayed it callers a timer script which keeps on running indefinitely until the timer script is killed by the user. This is where I have the problem,if I press... (2 Replies)
Discussion started by: mervin2006
2 Replies

4. HP-UX

Terminating Processes by Name

Hi! Just want to know if there is one command that I can use to kill processes by its name. Thanks. (1 Reply)
Discussion started by: love833
1 Replies

5. Shell Programming and Scripting

script unexpectedly terminating

I now that this isnt the greatest code around. Im a network guy by trade not a programer .. but needed something to compare config files ... Anyway ... intermittently, the program terminates. Ive been looking at the code for a week trying to figure it out and Im stumped. Can anyone provide... (0 Replies)
Discussion started by: popeye
0 Replies

6. Shell Programming and Scripting

nohup terminating

hi all, i m running few batch process through shell script using nohup command but when session get terminated(due to network, reboot of desktop and closing session directly) all processes terminating abnormally and core file is generating. application batch process is connecting oracle... (4 Replies)
Discussion started by: arvindng
4 Replies

7. UNIX for Advanced & Expert Users

Threads terminating when a signal is generated

hi all, i had created 3 threads using pthreads. Each thread does a different job. Now the main problem is when one thread generates a signal (for example SIGFPE, SIGINT) then the process terminates and all other threads do terminate eventually. I want to keep other threads running i.e, i... (0 Replies)
Discussion started by: skyrulz
0 Replies

8. Shell Programming and Scripting

How can i terminating expect script without terminating SSH connection.

Hi all , i know i ask a lot of question but these are really hard to solve and important question. I send two scripts: expect.sh: #!/usr/local/bin/expect spawn ssh root@172.30.64.163 expect "login:" send "root\n" expect "password:" send "root\n^M" interact and son.sh: ... (2 Replies)
Discussion started by: fozay
2 Replies

9. UNIX for Advanced & Expert Users

why the script is not terminating with proper results

Hi everyone, I am new to the linux.I wrote a small script and assigning two values to fname and lname and I want if the fname or lname are not given proper name like Toys or Gun the script should terminate and if they are given proper name it should execute.please help thanks:wall: #!/bin/bash... (4 Replies)
Discussion started by: starter2011
4 Replies
showmount(1M)															     showmount(1M)

NAME
showmount - show all remote mounts SYNOPSIS
[host] DESCRIPTION
lists all clients that have remotely mounted a file system from host. This information is maintained by the server on host (see mountd(1M)). The default value for host is the value returned by (see hostname(1)). Options Print all remote mounts in the format where hostname is the name of the client, and directory is the root of the file system that has been mounted. List directories that have been remotely mounted by clients. Print the list of shared file systems. WARNINGS
If a client crashes, executing on the server will show that the client still has a file system mounted. In other words, stale entries may accumulate for clients that crash without sending an unmount request. Also, if a client mounts the same remote directory twice, only one entry appears in Doing a of one of these directories removes the single entry and no longer indicates that the remote directory is mounted. FILES
remote mounted filesystem table AUTHOR
was developed by Sun Microsystems, Inc. SEE ALSO
hostname(1), mountd(1M), share(1M), share_nfs(1M), rmtab(4). showmount(1M)
All times are GMT -4. The time now is 02:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy