Sponsored Content
Full Discussion: Posted a Question Yesterday
Top Forums Shell Programming and Scripting Posted a Question Yesterday Post 302152317 by xgringo on Wednesday 19th of December 2007 02:56:57 PM
Old 12-19-2007
Quote:
Originally Posted by Smiling Dragon
It's not irrelevant, just different. The test says "is the following entry a directory?" Putting a trailing slash says "Don't match unless this is a directory" it's redundant.

It starts to become extremely important to know the difference when you use mv, if you include a trailing / on the desitnation path, it will fail if the dir does not exist. If you leave it off, it will rename the source to the name of the desitnation directory but only if it doesn't exist :/
''

I've made all the changes I get the same results.

#!/usr/bin/bash

bank=`cat /export/home/usr/banklist.txt`
cdir=`cat /export/home/usr/mountlist.txt`

for d in $cdir ;do
for i in $bank ;do

if [[ -d /apps/data/custdata/$d/$i/incoming ]] ; then
ls -ltra /apps/data/custdata/$d/$i/incoming
fi

if [[ -d /apps/data/custdata/$d/$i/outgoing ]] ; then
ls -ltra /apps/data/custdata/$d/$i/outgoing
fi
done
done;

Or

#!/usr/bin/bash

bank=`cat /export/home/usr/banklist.txt`
cdir=`cat /export/home/usr/mountlist.txt`

for d in $cdir ;do
for i in $bank ;do

if test -d /apps/data/custdata/$d/$i/incoming ; then
ls -ltra /apps/data/custdata/$d/$i/incoming
fi

if test -d /apps/data/custdata/$d/$i/outgoing ; then
ls -ltra /apps/data/custdata/$d/$i/outgoing
fi
done
done;

both get no output.

Last edited by xgringo; 12-19-2007 at 04:23 PM..
 

7 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

minor issue on question that i had posted !!

to the moderators of this site... i posted a question several weeks ago about a egep -e if you look through my posts you will see that my question was fully plausible as a reasonable post that could have been answered even it was to say that I should search the man pages myself and find the... (4 Replies)
Discussion started by: moxxx68
4 Replies

2. Post Here to Contact Site Administrators and Moderators

how to delete a posted thread?

if any user think that the thread posted by them is not good and want to delete it how to do that? (1 Reply)
Discussion started by: sekar sundaram
1 Replies

3. Post Here to Contact Site Administrators and Moderators

posted twice on same thread..

sorry! accidentally posted the same post twice on a thread.. could you please remove the second .. thanx moxxx68 (1 Reply)
Discussion started by: moxxx68
1 Replies

4. What is on Your Mind?

How many has posted over 1000 posts????

Hey all, does any one know how many out of 49000 odd members have crossed the postings over 1000 messages???? (6 Replies)
Discussion started by: ahmedwaseem2000
6 Replies

5. Forum Support Area for Unregistered Users & Account Problems

Posted thread

Hi, I joined yesterday and posted a thread and received emails from people suggesting solutions. My problem is that when I tried to access my posting this morning by clicking on the link in an emial, it said I wasn't registered and I had to re-register and I can't find my posting. The emial I... (1 Reply)
Discussion started by: hdixon
1 Replies

6. Post Here to Contact Site Administrators and Moderators

Spam being posted by user

The second post in this thread is spam. All of the other posts that I looked at by the same user are also spam. https://www.unix.com/shell-programming-scripting/152728-using-grep-returns-partial-matches-i-need-get-exact-match-nothing.html Don't know if the individual reply can be scratched,... (2 Replies)
Discussion started by: agama
2 Replies

7. Solaris

This must be the dumbest question ever posted -T5140 power button

I have a T5140 and cannot find the power switch -is there an on/off button? Good grief ! Thank you in advance. joe (3 Replies)
Discussion started by: joboy
3 Replies
gnomevfs-cat(1)                                                    User Commands                                                   gnomevfs-cat(1)

NAME
gnomevfs-cat - print a file to standard output using the VFS system SYNOPSIS
gnomevfs-cat URI DESCRIPTION
gnomevfs-cat prints a file to standard output using the virtual file system to access the file via a URI. OPERANDS
The following operands are supported: URI Specifies the file location in standard URI format. EXAMPLES
Example 1: Cat a File From a Web Server example% gnomevfs-cat http://www.sun.com Example 2: Cat a Local File example% gnomevfs-cat file:///home/user/README.txt ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables: NLSPATH. EXIT STATUS
The exit value 0 is returned regardless of success or failure. FILES
The following files are used by this application: /usr/bin/gnomevfs-cat Executable to print a file to standard output using the VFS system ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-vfs | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
gnomevfs-copy(1), gnomevfs-info(1), gnomevfs-ls(1), gnomevfs-mkdir(1) NOTES
Written by Stephen Browne, Sun Microsystems Inc., 2004. SunOS 5.10 6 Sep 2004 gnomevfs-cat(1)
All times are GMT -4. The time now is 05:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy