Hi,
I faced an issue where i.e root goes to another user i.e test
su - test this records fine in user test's .sh_history file and you can see what commands has been applied, but if you use just su test without '-' dash this doesn't record anything at all.
Basically '-' reads user's environment...
Hi PHV,
Good point, I guess my excuse was that I don't know awk that much, but that example of yours was neat and useful!
Since we have torn this thread open and I was wondering in my orig. question a) how to read from the end of the file i.e last 150 characters after stripping the trailing...
Hi there!
Now it works as I hoped,
Annihilannic, your addition brought the desired solution, thank you!
Feherke, I think you are right, that the normal awk is not treating similarly reqular expressions.
I do not have the other flavours installed, which might have worked -don't know.
Anyways...
Hi Feherke,
I tried it out, but looks like it didn't work for me, since it returned just an empty answer.
So, I have talked in my question about nawk but I have used awk, since some of AIX machines that I use, do not have nawk (nor gawk/mawk).
In this vgersh99 example was he replacing tabs...
...tabs, what ever.
From the end these spaces etc. blanks can be eliminated with the vgersh99 nawk help.
ER=error.log
cat $ER| awk 'sub(/[ \t]*$/, "")' > /tmp/error.txt
So in the error.txt file it has removed from the end the white spaces and tabs, but how to get the last message:
AGAIN...
Howdy,
I am trying to make a script which first greps 'failed' messages and puts them into file.
Then I need to read each line and send them i.e as a separate mailx message.
Here first tested with echo-command to see the output:
So how to read a line as a string so that it would handle each...
Hi,
Did you try to put the mach1's IP on the remote machine's (145.224.208.46) .rhosts file and do you have enough permissions to run the df-command there?
Assuming 145.224.208.45 is mach1's IP address then .rhosts-file on a remote should look like
145.224.208.45 mach1 username
(On...
Hi Birdie,
Are you running rsh ash root or some other user?
I was facing similar problem when running that as an another user.
The problem was that it was required that suid-bit needed to be set on to be able to run rsh. Security risk? But that was a workaround and how it was set on our other...
I have written a small script (pass.sh) to find out those users and direct the output into a file:
#!/bin/ksh
#==============================================================
# Script pass.sh created to list persons who has userid=0
# Creator: Kimmers
# Date: 09/07/02
# Version: 0.0.1
#...
Good Day,
I would like to put a "query" script to a logfile from cron which is run scheduled on a certain day.
lets's say we have a logfile containing some data from Feb 21st to Feb 24th and I want to run a script that copies the content from Feb22 to Feb 24 into a new file
cat...
Hi,
You can try from here (depending your version):
http://www.ssh.com/support/documentation/online/ssh/quickstart/32/Installing_SSH_Secure_Shell.html
If interesed in openssh (which I am struggling with ;) and downloads etc. you can find here...
http://wp.netscape.com/download/0509102/10000-en-aix4.2---_qual.html
Looks like they don't have 4.3-version or newer released so it should be compatible.
Let me know,
#Kimmers
...":-:"
----
instfix -ivk 4330-06_AIX_ML|grep not | grep ':'
There was no data for 4330-06_AIX_ML in the fix database.
----
ls -l /tmp/.oslevel*
-rw-r--r-- 1 root system 79751 Mar 11 15:09 /tmp/.oslevel.mlinfo.cache
I will remove this when I do the update.
Regards...
Hi,
Thank You for the follow up.
I checked my links based on that thread and yes, those were created wrongly.
I made the corrections as requested there.
Do you think the maintenance level is causing still the TYPERML to appear as an return for a oslevel -command?
I wonder why since even if...
Sorry,
I found one thread handling this case, I have to try it out.
thread52-231894 on a keyword at the first time didn't return any matches.
Regards,
#Kimmers
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.