[HPADM] RE: -SUMMARY- using sed and a hex value substitution

From: Naylor, Jim (Jnaylor_at_Schnucks.com)
Date: 09/29/04

  • Next message: Javier González: "[HPADM] how to boot from dat drive on rx1600"
    To: "Hpux-Admin@Dutchworks. Nl (E-mail)" <hpux-admin@dutchworks.nl>
    Date: Wed, 29 Sep 2004 09:21:15 -0500
    
    

    Thanks to Hardeep Bhogal, Steve Illgen, and David Lodge for their responses.
    It appears that Linux uses the GNU sed which has more functionality than the
    standard sed that comes with HP-UX. I downloaded the GNU sed, compiled it,
    and it does work with the hex values.

    Example:
    File AAA contains one line:

    123456

    I execute the GNU sed as follows:

    sed s/1/'\x32/ AAA

    The output is now:

    223456

    Thanks,
    Jim Naylor
    Unix Systems Administrator
    Schnuck Markets, Inc.
    * Direct: (314) 994-4784
    *)) Cell: (314) 691-0186
    * Fax : (314) 994-4684
    * jnaylor@schnucks.com

    -----Original Message-----
    From: Naylor, Jim
    Sent: Tuesday, September 28, 2004 11:01 AM
    To: Hpux-Admin@Dutchworks. Nl (E-mail)
    Subject: [HPADM] using sed and a hex value substitution

    Hello All,
    A co-worker asked me why the following command does not work on HP-UX but
    works on Linux.

    A file called AAA has this one line in it:

    123456

    Command:

    sed s/1/'\x32'/ AAA

    The '\x32' is the hex value
    The result:

    x3223456

    Any ideas would be greatly appreciated.

    Thanks,
    Jim Naylor
    Unix Systems Administrator
    Schnuck Markets, Inc.
    * Direct: (314) 994-4784
    *)) Cell: (314) 691-0186
    * Fax : (314) 994-4684
    * jnaylor@schnucks.com

    --
                 ---> Please post QUESTIONS and SUMMARIES only!! <---
            To subscribe/unsubscribe to this list, contact
    majordomo@dutchworks.nl
           Name: hpux-admin@dutchworks.nl     Owner:
    owner-hpux-admin@dutchworks.nl
     
     Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse
    only)
                http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse &
    search)
    --
                 ---> Please post QUESTIONS and SUMMARIES only!! <---
            To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
           Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
     
     Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
                http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)
    

  • Next message: Javier González: "[HPADM] how to boot from dat drive on rx1600"

    Relevant Pages

    • Re: Is there a tool to convert decimal/octal/hex ?
      ... On Tue, 2004-06-01 at 13:58, Randy Kelsoe wrote: ... >>I seem to remember that there used to be a tool in Linux to ... >>convert between decimal and octal and Hex, ... How about the bc command. ...
      (Fedora)
    • [PATCH 19-rc2] Fix misc .c/.h comment typos
      ... Implements an interface for i2c compatible eeproms to run under linux. ... Changed struct initializer syntax to the currently preferred notation ... ** Packet is an actual packet structure to be filled in with the packet ... -** as the command processore doesn't process the command packet in any way. ...
      (Linux-Kernel)
    • Re: [opensuse] deleting
      ... during the installation of jre 1.5.0 (according to the install ... i'm learning and having fun with my new toy, the command line interface. ... understand and use linux more efficiently. ... /bin/sh is the Bourne Shell. ...
      (SuSE)
    • Re: how i will open (from Java Application) the MS word format /html documentsin repective Applicati
      ... documentsin repective Applications in Linux OS? ... What I did in the Linux version of our product was require an external ... I create a URI object around it and use that. ... array by separating the CDE command line at the spaces, ...
      (comp.lang.java.programmer)
    • Re: VERY basic linux system
      ... "> I keep hearing that you can modify linux to your liking, ... 'user', but once you have a multi-tasking kernel, multi-user is pretty ... Command names are arbitary and virtually all command shells allow all ... supporting stuff, and stuff supporting the support stuff, etc. ...
      (comp.os.linux.misc)