User Profile

Collapse

Profile Sidebar

Collapse
ValHolla
ValHolla
Last Activity: Dec 13 '07, 09:14 PM
Joined: Sep 28 '06
Location: St. Louis, MO
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • ValHolla
    replied to Extracting data from a file
    in Perl
    perl -pe 'chomp;print "\n" if $i++ && m/Total Number Of Inputs/;$_=(split/:/)[1];END {print "\n"}' report.txt
    See more | Go to post

    Leave a comment:


  • ValHolla
    replied to Mail() Script OK?
    in PHP
    I am not sure if this is the cause, but try a different encoding. MIME "should" be accepted by all mail servers.

    http://us.php.net/function.mail for examples on sending HTML email....
    See more | Go to post
    Last edited by zmbd; Sep 8 '18, 05:11 AM. Reason: [z{redacted personal information per request and site policy}]

    Leave a comment:


  • Code:
    find . -type d -prune -exec ls -rt {} \; |tail -1
    This code will give you the "LAST" directory listed in the current directory
    depending on your OS you the -prune option may be -maxdepth 1 instead

    Code:
    find . -type d -maxdepth 1 -exec ls -rt {}\;|tail -1
    See more | Go to post

    Leave a comment:


  • ValHolla
    replied to Why 08, 09 cannot be used as 8 ,9?
    if you need them to be viewed as 08 and 09 you can do your calculations with the decimal equivalents 0 - 9 and use printf to display them with the leading 0 (zero)
    See more | Go to post

    Leave a comment:


  • if you are looking to do this in C. check out the man page for strtok...
    See more | Go to post

    Leave a comment:


  • ValHolla
    replied to Open system call
    The '0' in 0764 is for the use of "sticky bit", "setuid", "setgid" etc...

    here is how that bit is set
    4 - setuid
    2 - setgid
    1 - sticky bit

    setuid will yield a file that will be executed as the "owner" regardless of the user that executes the file

    setgid will yield the same as setuid but with "group" instead of owner.

    ...
    See more | Go to post

    Leave a comment:


  • here is sample code to get memory information from solaris in C

    Code:
    #include <stdio.h>
    #include <unistd.h>
    
    int main()
    {
    
       long numPages, pageSize, freePages, totalSize, totalUsed, totalFree;
    
       numPages = sysconf(_SC_PHYS_PAGES)/1024;
       pageSize = sysconf(_SC_PAGESIZE)/1024;
       freePages = sysconf( _SC_AVPHYS_PAGES)/1024;
       totalSize
    ...
    See more | Go to post

    Leave a comment:


  • using the nslookup command (windows or UNIX) you can get this information.
    here is a quick sample script for UNIX (nslookup-dmp.ksh)
    usage will be nslookup-dmp.ksh {domain} i.e. yourname.com
    Code:
    #!/bin/ksh
    /bin/echo "The Internet Address of $1..."
    /bin/nslookup -q=A $1
    /bin/echo "The canonical name for alias for $1..."
    /bin/nslookup -q=CNAME $1
    /bin/echo "The host CPU and
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...