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 SkipVought 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: iknowitall
  • Order by date
  1. iknowitall

    Redirect standard output?

    enq > /tmp/enq.out 2>&1
  2. iknowitall

    user input in a shell script

    [[ -z $1 ]] && set -- - # use stdin if no arguments exec 3< $i # open file exec 3<&0 # use stdin while read -u3 -r line #read line print -r -- "$line" # print line exec 3<&- #close file
  3. iknowitall

    kill idle process when users has another process still active

    Hey, you posted this in the AIX forum, too!
  4. iknowitall

    user input in a shell script

    You can use Ksh read and print to accomplish the same thing 'rl' does without having to install another program that would need to be maintained. You can remove the 'print -r' line if you don't want to echo your input. #!/usr/dt/bin/dtksh print "Prompt: " [[ -z $1 ]] && set -- - for i do...
  5. iknowitall

    kiling idle users process but not active one

    I'm okay with that [smile]. Why not try something like I have below that eliminates all of the temp files that are being created. Untested. who -u | cut -c 42-46,51-55 | sort -n -f | grep -E "5:|6:|4:|3:|2:" | cut -c 6-10 | exec 3<&0 | read -u3 -r line | kill -6 "$line"
  6. iknowitall

    kiling idle users process but not active one

    I implemented this for a user who wanted all processes over 1 hour to be killed but not those processes that are under 1 hour. You will have to make any modifications to suit your own needs. #!/bin/ksh Ctime=$(date +%T) __chk_time() { CtimeH=$(echo $Ctime | awk -F: '{ print $1 }')...
  7. iknowitall

    The confusing world of self-employment...

    How can a sole proprietorship reduce your "personal tax base" when that income is included as personal income?
  8. iknowitall

    Guru status?

    Ever think of using Merriam-Webster for the real definition of a guru? http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=guru
  9. iknowitall

    Convert Unix-Dos file to Dos file!

    Solaris: unix2dos, dos2unix AIX: dosread, doswrite tr -d '\r' sed 's/^M//g' file > newfile #where ^M is ctrl-v/ctrl-m ftp would also work with the binary and ascii subcommands.
  10. iknowitall

    Gil process

    Process network interrupts by type.
  11. iknowitall

    find and purge log files

    /usr/bin/find /var/log/active/*gz -mtime +7 | xargs rm
  12. iknowitall

    How to increase max number of groups per uid ?

    This is set in /usr/include/sys/limits: #define NGROUPS_MAX 32
  13. iknowitall

    user input in a shell script

    Best I can come up with as of now. The user will have to press the "=" key and it will fill in /foo/bar/ and they can edit it. #!/usr/dt/bin/dtksh function vi_tab { if [[ ${.sh.edmode} != " " && ${.sh.edchar} == "=" ]] then .sh.edchar="/foo/bar/" fi } print "Prompt: \c"...
  14. iknowitall

    using haemqvar with PSSP

    If anyone has an installed SP2 complex I have created a script to check for certain conditions. It uses 3 files as shown below. I hope someone finds it useful. psspchk.sh #!/usr/dt/bin/dtksh __GetDisks() { x=$(grep hdisk /tmp/work.txt) if [[ $? -eq 0 ]] then R=${x#*=}; L=${R%%;*}...
  15. iknowitall

    user input in a shell script

    Okay. Now that I reread it, are you wanting it to prompt: Please update the following path: and below that it would display the path: /foo/bar/ ?? Which means that you really don't want to use 'read' because you want to edit (/foo/bar/) and then enter that to be used for the rest of the script?
  16. iknowitall

    user input in a shell script

    I am unclear of what you exactly want. Can you try to explain it differently?
  17. iknowitall

    Reset &quot;iostat -i&quot; counters

    You can reset them in AIX.

Part and Inventory Search

Back
Top