Sponsored Content
Full Discussion: A logical problem.
Top Forums Shell Programming and Scripting A logical problem. Post 302407616 by dashok.83 on Friday 26th of March 2010 01:13:27 AM
Old 03-26-2010
A logical problem.

I'm having a logical problem.Can anybody help me.

Code:
while [[ ! -e $ZipFile ]]
do
  echo " Enter the Zip File Name   : \c"
  read ZipFile
done

In the above snippet - I want it ask for file name first time and once validation fails, I want it add a msg that its entered file name doesn't exist and ten prompt for file name again.

Could be silly.- But it just that I not able get a logic for it.
 

8 More Discussions You Might Find Interesting

1. News, Links, Events and Announcements

Did not know about logical volumes

I had just updated - reinstalled - my RH9 to a Fedore Core 3. I did not know about the Logical volumes that automatically combined partitions on drive 1 and 2 into one mounted volume. In my attempts to do something with the hdb2 partition - not knowing that it was already in use - I killed my... (2 Replies)
Discussion started by: gezi
2 Replies

2. Shell Programming and Scripting

logical OR in sed

frnds.. can i perform an OR operation in sed syntax ? if yes.. how? I need to search for some 2-3 mail addresses in multiple files and delete all those... and instead of them.. I need to insert a new mail id...( these are also other emails in that list .. which sud not be affected ) is... (8 Replies)
Discussion started by: clx
8 Replies

3. UNIX for Advanced & Expert Users

Problem syncing logical volume in root vg

Hello. I have a test server that I'm messing around with, and just recently received an error on startup that a logical volume in the root volume group couldn't be re-synchronized. Server boots fine, as the root vg is mirrored, but I'd like to get rid of the error. Here are the details: ... (1 Reply)
Discussion started by: matt.d
1 Replies

4. Shell Programming and Scripting

How to do logical AND and logical OR with grep

Hi can someone please help me on this. I need to perform this code: Grep any lines that meets the following criteria (A AND B) OR (A AND C) I tried this code, but it didn't work Grep-I "A &&B" | "A&&C" *.* $ thanks in advance (12 Replies)
Discussion started by: Needhelp2
12 Replies

5. UNIX for Dummies Questions & Answers

problem using logical or

Hi, I have a script testor.s which takes a string as command line argument, Contents of the script: #!/bin/ksh -x if ] then echo "error" else echo "correct" fi Here, though i provide the command line argument as "WO_STMT_05292009", it displays error Is there... (3 Replies)
Discussion started by: Sheema
3 Replies

6. Shell Programming and Scripting

op of logical operator

Why the op of the following code is like this ???? i=4 j=-1 k=0 echo $? echo $? echo $? (5 Replies)
Discussion started by: lipun4u
5 Replies

7. Shell Programming and Scripting

Logical error

I have this script to uvscan-update. Seems like that i am getting logical error at the end of the script. It is updating the script and also giving the error message to update it manually. I have deleted the DAT files to see if it will create new and it does. Below is the error and the script: ... (1 Reply)
Discussion started by: mk07md
1 Replies

8. AIX

Logical Partitions?

I'm trying to find out how many logical partitions our AIX box has. I'm running the command: topas -C and nothing is showing up. Is it safe to say that there is only one LPAR, which is what AIX is installed on? Move to AIX - jim mc (2 Replies)
Discussion started by: NycUnxer
2 Replies
zipios::FileCollection(3)				     Library Functions Manual					 zipios::FileCollection(3)

NAME
zipios::FileCollection - SYNOPSIS
#include <fcoll.h> Inherited by zipios::CollectionCollection, zipios::DirectoryCollection, and zipios::ZipFile. Public Types enum MatchPath { IGNORE, MATCH } Public Member Functions FileCollection () FileCollection constructor. FileCollection (const FileCollection &src) Copy constructor. const FileCollection & operator= (const FileCollection &src) Copy assignment operator. virtual void close ()=0 Closes the FileCollection. virtual ConstEntries entries () const virtual ConstEntryPointer getEntry (const string &name, MatchPath matchpath=MATCH) const virtual istream * getInputStream (const ConstEntryPointer &entry)=0 virtual istream * getInputStream (const string &entry_name, MatchPath matchpath=MATCH)=0 Returns a pointer to an opened istream for the specified entry name. virtual string getName () const Returns the name of the FileCollection. virtual int size () const Returns the number of entries in the FileCollection. bool isValid () const The member function returns true if the collection is valid. virtual FileCollection * clone () const =0 Create a heap allocated clone of the object this method is called for. virtual ~FileCollection () FileCollection destructor. Protected Attributes string _filename Entries _entries bool _valid Detailed Description FileCollection is an abstract baseclass that represents a collection of files. The specializations of FileCollection represents different origins of file collections, such as directories, simple filename lists and compressed archives. Definition at line 21 of file fcoll.h. Constructor &; Destructor Documentation zipios::FileCollection::FileCollection () [inline, explicit] FileCollection constructor. Definition at line 24 of file fcoll.h. zipios::FileCollection::FileCollection (const FileCollection &src) [inline] Copy constructor. Definition at line 115 of file fcoll.h. zipios::FileCollection::~FileCollection () [virtual] FileCollection destructor. Definition at line 63 of file fcoll.cpp. Member Function Documentation virtual FileCollection* zipios::FileCollection::clone () const [pure virtual] Create a heap allocated clone of the object this method is called for. The caller is responsible for deallocating the clone when he is done with it. Returns: A heap allocated copy of the object this method is called for. Implemented in zipios::CollectionCollection, zipios::DirectoryCollection, and zipios::ZipFile. virtual void zipios::FileCollection::close () [pure virtual] Closes the FileCollection. Implemented in zipios::CollectionCollection, zipios::DirectoryCollection, and zipios::ZipFile. ConstEntries zipios::FileCollection::entries () const [virtual] Returns a vector of const pointers to the entries in the FileCollection. Returns: a ConstEntries containing the entries of the FileCollection. Exceptions: InvalidStateException Thrown if the collection is invalid. Reimplemented in zipios::CollectionCollection, and zipios::DirectoryCollection. Definition at line 17 of file fcoll.cpp. ConstEntryPointer zipios::FileCollection::getEntry (const string &name, MatchPathmatchpath = MATCH) const [virtual] Returns a ConstEntryPointer to a FileEntry object for the entry with the specified name. To ignore the path part of the filename in search of a match, specify FileCollection::IGNORE as the second argument. Parameters: name A string containing the name of the entry to get. matchpath Speficy MATCH, if the path should match as well, specify IGNORE, if the path should be ignored. Returns: A ConstEntryPointer to the found entry. The returned pointer equals zero if no entry is found. Exceptions: InvalidStateException Thrown if the collection is invalid. Reimplemented in zipios::CollectionCollection, and zipios::DirectoryCollection. Definition at line 34 of file fcoll.cpp. virtual istream* zipios::FileCollection::getInputStream (const ConstEntryPointer &entry) [pure virtual] Returns a pointer to an opened istream for the specified FileEntry. It is the callers responsibility to delete the stream when he is done with it. Returns 0, if there is no such FileEntry in the FileCollection. Parameters: entry A ConstEntryPointer to the FileEntry to get an istream to. Returns: an open istream for the specified entry. The istream is allocated on heap and it is the users responsibility to delete it when he is done with it. Exceptions: InvalidStateException Thrown if the collection is invalid. Implemented in zipios::CollectionCollection, zipios::DirectoryCollection, and zipios::ZipFile. virtual istream* zipios::FileCollection::getInputStream (const string &entry_name, MatchPathmatchpath = MATCH) [pure virtual] Returns a pointer to an opened istream for the specified entry name. It is the callers responsibility to delete the stream when he is done with it. Returns 0, if there is no entry with the specified name in the FileCollection. Parameters: matchpath Speficy MATCH, if the path should match as well, specify IGNORE, if the path should be ignored. Returns: an open istream for the specified entry. The istream is allocated on heap and it is the users responsibility to delete it when he is done with it. Exceptions: InvalidStateException Thrown if the collection is invalid. Implemented in zipios::CollectionCollection, zipios::DirectoryCollection, and zipios::ZipFile. string zipios::FileCollection::getName () const [virtual] Returns the name of the FileCollection. Returns: the name of the FileCollection. Exceptions: InvalidStateException Thrown if the collection is invalid. Definition at line 50 of file fcoll.cpp. bool zipios::FileCollection::isValid () const [inline] The member function returns true if the collection is valid. Returns: true if the collection is valid. Definition at line 93 of file fcoll.h. const FileCollection & zipios::FileCollection::operator= (const FileCollection &src) [inline] Copy assignment operator. Definition at line 125 of file fcoll.h. int zipios::FileCollection::size () const [virtual] Returns the number of entries in the FileCollection. Returns: the number of entries in the FileCollection. Exceptions: InvalidStateException Thrown if the collection is invalid. Reimplemented in zipios::CollectionCollection, and zipios::DirectoryCollection. Definition at line 57 of file fcoll.cpp. Author Generated automatically by Doxygen for Zipios++ from the source code. Zipios++ Mon Oct 10 2011 zipios::FileCollection(3)
All times are GMT -4. The time now is 04:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy