skege
asked on
Aix shell scripting
Hello!
This is my first post so please understand =)
First Sorry for my bad english..
I want to verify that my nfs mount is ok before i run the backup script. I tried next:
[code)
#!/bin/bash
#test
if [ -a /mnt/backup/test.nfs ]; then
cp -R /data1/* /mnt/backup/data1
cp -R /data2/* /mnt/backup/data2
else
echo backup failed!
fi
[/code]
/mnt/backup/test.nfs is file that i create on nfs drive..
and the script checks if the file exist and if it exists script runs "backup".
That script work fine on the linux machine, but what do i must exchange to get that script work in IBM RS6000/AIX 4.3?
Hope somebody understand what i´am trying to say =)
This is my first post so please understand =)
First Sorry for my bad english..
I want to verify that my nfs mount is ok before i run the backup script. I tried next:
[code)
#!/bin/bash
#test
if [ -a /mnt/backup/test.nfs ]; then
cp -R /data1/* /mnt/backup/data1
cp -R /data2/* /mnt/backup/data2
else
echo backup failed!
fi
[/code]
/mnt/backup/test.nfs is file that i create on nfs drive..
and the script checks if the file exist and if it exists script runs "backup".
That script work fine on the linux machine, but what do i must exchange to get that script work in IBM RS6000/AIX 4.3?
Hope somebody understand what i´am trying to say =)
ASKER
yesh, sorry there is no bash in AIX box..
I test the script
I test the script
ASKER
./backuptest[2]: [-a: not found.
backup failed!
script returns something like that.
And I am sure that /mnt/backup/test.nfs file exists.
Any suggestions?
backup failed!
script returns something like that.
And I am sure that /mnt/backup/test.nfs file exists.
Any suggestions?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks that works!
Normally i use rsync but i dont own these machines and i have no rights to install rsync :)
And i don`t use tar because customer wants use cp..don`t ask why.
Normally i use rsync but i dont own these machines and i have no rights to install rsync :)
And i don`t use tar because customer wants use cp..don`t ask why.
do a:
ls /bin/bash to find out
otherwise, just change the script header to:
#!/bin/ksh
and keep the other statements unchange.