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

Recent content by StevieW85

  1. StevieW85

    What Kind Of Machine ??

    For playing, the machine doesn't have to be that powerful. I too would recommend a used machine, but I think you could pick up an adequate Intel box even cheaper than the Sun. As for reality, you can get pretty close with a PC. I had Solaris 7 running on an old Dec 386 box with about 32MB and...
  2. StevieW85

    how to make a shell for sending mail

    Actually, you should be able to do the same with mail (instead of using mailx): mail -s &quot;Shell Generated Mail&quot; steview85 <<-EOF Hello world :) EOF Note that &quot;EOF&quot; stands for &quot;end of file&quot;, but it is just a label here -- you can use another label if you...
  3. StevieW85

    Cut certain lines in a number of files

    My choice would be to replace the awk line with egrep -v mailfix $i > $i.tmp - Steve StevieW85@go.com
  4. StevieW85

    Automating mail content to file by mail subject

    Ang, When I suggested that your mail tool is best, I was talking about deleting mail that is already in your mailbox. Use the sort capabilities to select unwanted mail - perhaps moving suspect mail to a new folder and using a different sort criteria to narrow the selection - then delete it...
  5. StevieW85

    Automating mail content to file by mail subject

    This thread is OK by me, but it's up to you. :-) (If you really want to go deeper, it would probably be a good idea to start a new thread.) Your mail tool is probably best here. You can do something like a select on the whatever criteria, then delete the selected messages. Otherwise... You...
  6. StevieW85

    UNIX Date stamped files

    Ifoata is assuming that the reason for the rename is to allow undeletes. Therefore, alias rm to move the file rather than to actually delete it. At some point, you would then need to do a clean up where the old files are actually deleted. I don't have any idea why Helfenmir is trying to do...
  7. StevieW85

    Automating mail content to file by mail subject

    I use elm primarily because I got tired of having to learn a new GUI based mail tool each time I switched systems. Elm was constant. (Pine is quite similar.) The mail tool installed on your system probably has all the necessary capability. Rather than recommending you use elm, I suggest you...
  8. StevieW85

    UNIX Date stamped files

    Does this do what you want? cp file newdir/file.`date +&quot;%Y%m%d&quot;` The command in backward apostrophes -- `<cmd>` -- runs the command and uses the output of that command on the command line. See the date man pages for more info on formatting the output of date. Hope this helps! -...
  9. StevieW85

    Size of a file

    Use ls -l filename. - Steve StevieW85@go.com
  10. StevieW85

    Listing files using the ls command

    kupham, The easiest is to give ls the current directory: ls `pwd` or ls $CWD Alternatively, if you're trying to list only files that match the &quot;*.*&quot;, as in your original question, use ls -d `pwd`/*.* (Again, use the -d to limit the list to entries in the current directory...
  11. StevieW85

    Global text insertion using vi

    The % is a shortcut for 1,$ for the range. CaKiwi's response shows how the words from expression1 are retained with the additional text. In this case, you can just include them in expression2, but the other method -- using the \( and \) -- allows you to preserve selections found with...
  12. StevieW85

    Automating mail content to file by mail subject

    Most semi-sophistocated mail tools can make Mike's option 1 even easier. You set up flags to handle (save/forward/delete/etc.) messages based on different criteria (subject/sender/etc.). My personal favorite is elm (because I could run it on all the *ix systems I've used over the years - I'm...
  13. StevieW85

    Unix File Status - when has an ftp to unix finished

    Mike may be lazy, but his is probably the most elegant solution. We have used both his suggested method and the flag file (like big_file.finished) in production applications. Checking the ftp connection is fun for academics and expanding your Unix knowhow, but for real world, stick with the...
  14. StevieW85

    Listing files using the ls command

    While I'm a big fan of find, I think that this is overkill when ls can do exactly what you desire (with less keystokes). Use the -d flag: ls -d $VAR_DIRECTORY/*.* >> temp.txt This will cause ls to list directory names instead of the contents of directories. Now, if you want to list just...

Part and Inventory Search

Back
Top