Hi all,
The awk statement below nearly works as I want it to. That is it removes :: if it is on the end or beginning of the PATH variable, but :: anywhere else is not removed - however ::: is. So it is nearly there. Any awk experts able to shed light light on getting the :: removed rather than...
I knocked this together today but it is not listing all files in the while true FILE loop. I tried two variations, one with the ultimate endgame matching files which are go+w and one without. The idea is to check the files in each users home directory to ensure nothing is go+r.
lsuser -a home...
Hi guys,
I have a script which I would like to run as a shell pipeline, so I copied it all into one line and it does not work.
su - root -c "echo /:${PATH}" | tr ':' '\n' | while read DIR ; do ; DIR=${DIR:-$(pwd)} ; print "Checking ${DIR}"; while [[ -d ${DIR} ]]; do; [[ "$(ls -ld ${DIR})" =...
Hi all,
I inherited this script which does not work on AIX:-
touch a; chmod og-rwx a; ui=($(echo 0027 -n | fold -w1));sys=($(perl -e 'printf "%04o\n",(stat shift)[2] & 07777' a | fold -w1));for (( i=0; i<4; i++ )); do echo -n $(( ${ui[$i]} & ${sys[$i]})); done
Basically, it is supposed to...
Hi all,
On AIX I had some problems with \s+ matching spaces so ended up using [[:blank:]]. But if there are multiple spaces between two words in a file, what is the best way of using [[:blank:]] without typing it more than once? Also the number of space varies per line, so there is no fixed...
Thanks Sam,
That was a very good idea - have a star. I have ended up with this (adding in a check also for group writable directories). It does not traverse all the way up to "/" so I also hardcoded that into the script. Let me know if you think it could be made more efficient:-
#!/bin/ksh
su...
Hi all,
I am trying to come up with the simplest way to parse root's path and then examine whether or not each directory is world writable or not. So far this works fine in listing the PATH names:-
for DIR in `su - root -c "echo $PATH"| tr ':' ' '`
do
ls -lLd $DIR
done
This lists:-...
Hi there,
This is giving me a bit of headache. Trying to grep out IP addresses from files, so looking for a "xxx.xxx.xxx.xxx" address format:-
cat /tmp/test |egrep "[0-9]{1,3}\.[0-9]{1,3}\.([0-9]{1,3}"
This is the command I came up with, sort 0-9, 1-3 times followed by a dot. It works but it...
Hi,
Log in as another user and check out the .profile for that user via vi. It sounds like your default profile may be the problem here i.e. there are invalid entries.
Best of luck
PSD
IBM Certified Specialist - AIX V4.3 Systems Support
IBM Certified Specialist - AIX V4 HACMP
Josh,
If you get the PVID of the failed disk just use:
reducevg rootvg <PVID of missing disk>
It seems that you did not remove the original hdisk1 from
the volume group, according to your steps above.
Cheers
PSD
IBM Certified Specialist - AIX V4.3 Systems Support
IBM Certified Specialist -...
amins,
This is a limitation is the native AIX grep command. You will need something like GNU grep to get past this limitation, you can download it for AIX 5.1 at:
http://aixpdslib.seas.ucla.edu/packages/grep.html
Cheers
PSD
IBM Certified Specialist - AIX V4.3 Systems Support
IBM Certified...
Ken,
This is most likely due to the name resolution of the server you are connecting from. Add both the hostname and fully qualified domain name into your .rhosts file to be safe, and of course make sure you can resolve both on the target server.
Cheers
PSD
IBM Certified Specialist - AIX...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.