Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AIX 4.3 - 5.1 difference ??

Status
Not open for further replies.

UCF87

Technical User
Feb 13, 2003
44
0
0
US
I can run the script fine on 4.3 but it fails on 5.1

Error:
cd: 0403-010 A specified flag is not valid for this command.

Script:

for DIRA in `ls`
do
if [ -d $DIRA ]
then cd $DIRA <--- Line failure
ls dis* > /dev/null 2>&1
if [ $? -eq 0 ]
then
pwd > /lcca/work/tmp/faclist
fac=`cut -c17-21 /lcca/work/tmp/faclist|head -1`
echo &quot;\n\t\t Facility $fac&quot; >> /lcca/work/tmp/ebrlist

for n in `ls`
do
echo &quot;\t\t $n&quot; >> /lcca/work/tmp/ebrlist 2>&1
done
fi
cd ..
fi
done



Any help would be appreciated.

 
whats the error?

You would have been better off posting this on the AIX Forum

--
| Mike Nixon
| Unix Admin
|
----------------------------
 
Maybe there is a directory on your Aix5.1 machine that has a dash as the first character of its name. For example, I get the same error message if I type in the following from a command prompt:

cd -hello
cd: 0403-010 A specified flag is not valid for this command.

 
That is exactly what is happening. For some reason &quot;something&quot; is creating a -346 directory on our NFS mounted drive (NT Server). It is not being created in AIX because it will not allow you to create a dash in front of a directory name.

We are unable to determine at this time how this directory is being created --- very strange.

 
you can get into it via &quot;cd -- -346&quot;

remember a doubled dash indicates that args end here.

rmdir will require the same thing if you to remove it - &quot;rmdir -- -346&quot;

(and &quot;mkdir -- -346&quot; works, even in AIX =D)
 
you can also get into it by specifying the full path of the directory so that the first character specified is not the -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top