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.2 verses 5.1

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.

 
first thing I would do would be to split the &quot;then&quot; and &quot;cd $DIRA&quot; onto different lines.
 
Tried that already... same error.
 
What are you trying to do? I get no errors running a cd from the for loop.
 
I found the problem, I had a -386 directory. Once I deleted it, it ran ok.

Thank you for responding
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top