first of all in the best case this script has to work on every os (lnx/aix/sun).
It's very simple what it should do.
I have a standard path and I'll call it for this example /myhome/scripts
Within this path there are more files and folders and some of them are tagged with "orig_*" or "*_orig" at the beginning or at the end.
I want to find all of these files/folders and want to rename all of them but without the orig.
What i come around with.
Code:
MY_HOME="/myhome/scripts"
FIND_ORIG="$MY_HOME/find_orig.out"
echo "rename all orig_ files"
find ${MY_HOME}/orig_* >> ${FIND_ORIG} 2>/dev/null
for LINE in `cat ${FIND_ORIG}`; do
OLD_NAME=${LINE}
NEW_NAME=${LINE} | sed -e 's/orig_//'
mv ${OLD_NAME} ${NEW_NAME} >> ${INSTALL_LOG}
echo "moved $OLD_NAME to $NEW_NAME"
done
echo "done with renaming"
I tested it on lnx and aix and $NEW_NAME got no input. So he cant mv anything because of a missing destination file. Dont know why.
Another problem is the find command itself. * is not working on lnx etc pp.
I can't seem to get the umask command to work the same way in AIX that is worked in SUN. Can somebody tell me if I have to do something else.
I'm using a userid to login. In that userid's profile. I add the umask command umask 003. I would like all files created by this ID to have... (2 Replies)
Hi,
I have recently purchase a SUN Storage Tek desktop LTO 4 HH tape drive and connected to a IBM AIX 5.1 server.
The server can detect the tape device.
Can someone please advice urgently.
Thanks (4 Replies)
Hi,
I'm puzzled at how this could be.
I'm trying to transfer some files from an Sun box to an AIX box via FTP. The file transfer goes fine until it reaches a file of about 150k then times out and fails.
The FTP Does not seem to be able to transfer files of more than 150k! However, I can... (5 Replies)
Hi,
When we tried to port our Pro*C programs from sun solaris to AIX,
We get following error messages:
The following library is not available... This library file is required for Pro*C Object Linking and Bin creation.
/usr/lib/libnsl.so.1.
Can anybody help us on this ?
Regards
rbs100 (1 Reply)
Hello,
I need a few explanation about the log files for system messages:
/var/adm/messages and
/var/log/syslog.
As /var/adm/messages is empty on my machine, i need help.
First, i would like to know what the difference between these 2 files is? Do they contain different kinds of system... (3 Replies)
hi, for aix and hpux, we have both mksysb and make_recovery for restoring to the former state after it was crashed. is there any equivalent to sun? any pointers will be appreciated. thanks (8 Replies)