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

  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

    ...That causes problems down the road. Yes, i'm sure I could just use another command to remove blank lines, but for the sake of efficiency, would rather not. the sed that I used is sed 's/newfile.*//' /tmp/tmpfile.tmp Perhaps it could be modified as well. Trying awk this time. Thanks for any help.
  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

    ...Test: $f1+$f2 "3544622433410082528180951/20939777980848187019369635" ne "21267734600460495169085706/125638667885089122116217810" Test: $f1*$f2 "580255459231916873949839/83759111923392748077478540" ne "1740766377695750621849517/251277335770178244232435620" Test: $f1 =...
  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