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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: pdtak
  • Content: Threads
  • Order by date
  1. pdtak

    Blank line inserted in output file from "ls -l" command

    I'm trying to capture the date/time portion of "ls -l" command as a file, but it puts a "blank line". How do I make it so that output file doesn't include a blank line? Example 1 (saved as a variable works good): var1=`ls -l /file1 | awk '{print $6,$7,$8}'` echo $var1 May 24 23:06 Example 2...
  2. pdtak

    ntp setup

    Anyone have any experience setting up ntp on AIX 5.3? Any tip will help. Thanks in advance.
  3. pdtak

    mv command not working if (not owner but in same group)

    I'm unable to move a file that I do not own but I'm part of the group the file is assigned to. Here's the scenario: userA owns file1 userA belongs to groupX userB belongs to groupX file1 has rights of 666 file1 is located in dir1 dir1 and dir2 are owned by userB dir1 and dir2 are group owned...
  4. pdtak

    Creating new network via Virtual Ethernet Adapter Configuration

    I'm trying to configure NIM Master server with 30 clients on Virtual Ethernet Adapter network because the current network setup will not work with NIM for me (bootp can't find the master). Probably need to create a new network to get it to work. My environment is 2 P5-590's (connected via...
  5. pdtak

    Find unique userid's from passwd file

    I need help with a script to find only users that starts with a alpha character followed by 4 digits (ie. a9999). Here's what I did so far (not working): #!/usr/bin/ksh cat /etc/passwd | awk -F: '{print $1}' | while [[ $MORE -ge 1 ]] do read USER if [ len(USER) == 5 ] then...
  6. pdtak

    Extract data from two files and create another

    I have two files that contains just file names. The first files has the nfs mount points (ie. /mnt, /nfs1, etc.) Second file has long file names (ie. /usr/bin/perl, /nfs1/file1, etc.) I want the third file to contain only the non-nfs mounted files. Example: file1: /mnt /nfs1 /nfs2 file2...
  7. pdtak

    awk print format question

    I'm trying to line up (align) output from "ls -l". I have the following awk command in a script that writes to a file (INFILE has bunch of file names): #!/bin/sh for LINE in `cat ${INFILE}` do echo `ls -l $LINE | awk '{printf ("%s %s:%s \t %s\n",$1, $3, $4, $9) }'` >> ${FORMATTED}...
  8. pdtak

    Find string in any file on any directory

    I need to find all occurrences of a particular string "Error code 27" from the whole server? I also need the file name associated with it. I tried the following command, but I only got the results from the current directory: > grep "Error code 27" * I need to go to all sub-directories and...
  9. pdtak

    Concatenate only digits from a line of text

    How do you contenate numeric value from a line of text? I need to store just the numbers into a valiable. #!/bin/ksh LINE="time_last_login=1220039866" TIME=<<concatenated value after the "=">> ... echo $TIME 1220039866 Thank you in advance.
  10. pdtak

    Calculate user's last login to check if &gt; 90 days

    I need a script to figure out if a user's last login was 90 days or older. OS=AIX, shell=Korn Here's what I have so far: ==== #!/usr/bin/ksh NOW=`lsuser -a time_last_login root | awk -F= '{ print $2 }'` (( LAST_LOGIN_TIME = 0 )) (( DIFF = $NOW - $LAST_LOGIN_TIME )) lsuser -a...
  11. pdtak

    Physical Partition size on rootvg

    How do you set the Physical Partition size on rootvg when installing AIX OS from scratch (via CD or NIM installation)? It seems to default to 32MB, but I would like it to be 128MB. Thanks!
  12. pdtak

    pkill equivalent command in AIX

    Does anyone know how I can find a process and kill it using one command line (ie. ps -ef | grep process; get PID; kill -9 PID)? I know in Solaris there's a pkill command, but I didn't find a pkill command in AIX. I like to run it in a script. How can I do this? Thanks.
  13. pdtak

    Need help in setting up NIM master on etherchannel environment

    I know that IBM's official stance is that NIM does not work on etherchannel environment, but has anyone able to get around it? I'm working on a p5-590 LPAR system, and the NIM master and clients are all on the same frame. Any help is appreciated.
  14. pdtak

    NIM error creating mksysb_resource via NIM

    Has anyone run into issues creating a mksysb_resource via NIM? We get the following messages 0042-001 nim: processing error encountered on "master": 0042-006 m_mkbosi: (From_Master) connect A remote host refused an attempted connect operation. This happens on the LPARs on the same frame...
  15. pdtak

    Reading 2 input files but not getting expected value

    I'm reading 2 input files but not getting expected value. I should get an alpha value on file_1_data but not getting any. Please help. >cat test6.sh awk ' FILENAME==ARGV[1] { file_1_data[$1]=$0; print "----- 1 Line " NR " -----" $1; next } FILENAME==ARGV[2] { file_2_data[$1]=$0; print...
  16. pdtak

    Cannot login via telnet or ssh to AIX 5.2 server

    I somehow modified the system so that no one can telnet or ssh into this box as any user including root. I might have blown away important files, I don't know. Please let me know what I have to check to make it so that I can login. This is what I get when I try to telnet or ssh: telnet bk02...
  17. pdtak

    password &quot;min age&quot; setting

    How do you change default setting on password expiration field? My default setting has 15 weeks for "password min age", and I would like it to be 0 for all of my current users as well as futures users created. I guess there's a default file that I need to update, but I don't know where it is...
  18. pdtak

    command completion in .sh or .ksh in AIX environment

    How do you user command completion in .sh or .ksh in AIX environment? I know you can do it by hitting <esc><esc> in bash, but how do you do it in bourne or korn shell in AIX 5.3 environment? Thanks in advance.
  19. pdtak

    sar or glace quivalent command in AIX?

    I'm new to the AIX environment, and I need to check the system state at certain interval (10 minutes) to see when it's saturated to take an appropriate actions. Any help is appreciated.
  20. pdtak

    BOLD printing a variable in PS1 command

    I would like to "BOLD" print the hostname in the following statement: export PS1=$USER"@"$(hostname -s):'$PWD>' Is there a special character I can put before and after the variable to make it bold or blinking? Thanks.

Part and Inventory Search

Back
Top