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: *

  1. pavNell

    Remove last field if string exists

    PHV, WOW! my heads hurts trying to read that last one-liner. :)
  2. pavNell

    Remove last field if string exists

    Regarding my last post. I was wrong. My two liner still adds a blank line to my tmp file. Just wanted to clear that up give credit where it's due. PHV's right on the money with his examples.
  3. pavNell

    Page Up/Down in vi/vim

    ctrl-f and ctrl-b work just fine for me and I didn't do anything to get it to. Using pclinuxos 2007. Perhaps an vim upgrade?
  4. pavNell

    Newbie help with sed

    Actually, it doesn't to anything to the text file. It just prints the results of the command to the screen. Also piping a text file into sed is not the most efficient way to use sed. Here's a better example and also overwrites the input file. Make a copy of text file first in case you screw it...
  5. pavNell

    ubuntu: "not real linux"?

    Does ubuntu do the things that you need to? If so then who cares? Not real Linux? Thats BS. I still talk to old grumpy unix guys who turn their nose up to linux only because it's not what they've grown to know and use. Sounds like your friend. IMO, Linux is not Linux if you install proprietary...
  6. pavNell

    Remove last field if string exists

    PHV, Yes, that works also. The awk example feherke gave is very similar to yours too. However, your example causes two writes to disk, right? Or is the first cached? I'm probably being a bit too anal about it but my two liner only causes one write and therefor is the more efficient solution in...
  7. pavNell

    Remove last field if string exists

    thanks, but your examples still leave a blank line *IF* the line is just 'newfile:/path/to/file'. They do work on the other lines however. But I've figured it out with sed! sed -e 's/newfile.*//' -e '/^[ ]*$/d' /tmp/tmpfile.tmp the second sed expression removes the blank line(s). So using the...
  8. pavNell

    Remove last field if string exists

    Hello all, I have a temporary file and at any time it may have only one of the following lines or none at all (empty file). AAA 50 50 60 60 90 90 or AAA 60 60 60 60 80 80 newfile:/path/to/a/file or newfile:/path/to/a/file Needing an awk in my shell script to remove only the...
  9. pavNell

    file locking

    My script is setup to display an image every 6 seconds. If not a new jpeg is present in the "bucket", it displays "the next jpeg in line". This 6 seconds is enough time for a large jpeg to transfer over, BUT, we're using wireless networking and sometimes latency prevents the jpeg to copy over...
  10. pavNell

    file locking

    Here's the deal.... /dir/A is a bucket that I shoot large JPEGS into from a camera. I have a script running that monitors this bucket and if it sees a new jpeg file in it, it displays the jpeg onto my screen. :-) However, since the file is really large, sometimes the script tries to display...
  11. pavNell

    Clone a USB thumbdrive

    Worked like a charm! Thanks. A perfect clone of my bootable damn-small-linux thumbdrive.
  12. pavNell

    Setup Linux as an Apacher Web Server

    How about a database, php, and perl support along with a ftp server, phpAdmin, all glued together nicely in a super simple installation to go with that web server? Try xampp. 1. download the latest installation to your /opt directory as root. 2. type: tar xzvf xampp-latest-version.tar.gz...
  13. pavNell

    Install Math::Fraction

    I believe i'm going in the right direction. I ran the command as root but I don't think it installed. Here's the output.... CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Database was generated on Thu, 08 Mar 2007 23:09:20 GMT Running install for module Math::Fraction Running...
  14. pavNell

    Clone a USB thumbdrive

    I have a USB thumbdrive thats got DSL (damn small linux) on it. I boot my PC with it. I love it. I'd like to "clone" this USB thumbdrive to another USB thumbdrive to have as a backup. Perhaps there's a tool or command to help me out? Thanks for any help.
  15. pavNell

    change the ip on a linux server

    a lot of distros come with a nice tool called netconfig. You can run it from the command line (as root) and it'll go through step by step to configure a network interface.
  16. pavNell

    Install Math::Fraction

    Hello Perl gurus. I'm new to perl and so far I'm having some great success and fun with it. Just one quick question... I need to install the module Math::Fraction It's not in my distros repository so being a newb I just can't seem to find a good source for help. I've had lots of luck with...
  17. pavNell

    help with 'or' in script

    I'm not at a term right now, but try: before... if [ ! -f /dira/$base.b ] -o [ ! -f /dirb/$base.b ] after... if [ ! -f /dira/$base.b -o ! -f /dirb/$base.b ]
  18. pavNell

    Can[t delete messages remotely

    thanks, I'll try there as well.
  19. pavNell

    pop3d and deleting messages via client

    John and Dianne both have user accounts on a linux box thats running postfix and pop3d. John and Dianne can both email each other on the linux box just fine with the mail command. However, when John or Dianne use the windows PC in the other room to access their email with ThunderBird client...
  20. pavNell

    Can[t delete messages remotely

    John and Dianne both have user accounts on a linux box thats running postfix and pop3d. John and Dianne can both email each other on the linux box just fine with the mail command. However, when John or Dianne use the windows PC in the other room to access their email with ThunderBird client...

Part and Inventory Search

Back
Top