[HPADM] ksh, IFS, and backslash

From: Rick Greene (RGreene_at_rbinc.com)
Date: 06/27/03

  • Next message: Rick Greene: "[HPADM] SUMMARY: ksh, IFS, and backslash"
    Date: Fri, 27 Jun 2003 12:56:26 -0400
    To: "Hpuxadmin (E-mail)" <hpux-admin@dutchworks.nl>
    
    

    Ok, I can't find anything in the archives, and things I've tried from "man ksh" hasn't helped.

    I have a string like this: outbox/08925485US00\200306131322.out.sent

    I'm trying to split it out so I get the part between the \ and the .out. I've tried:

    IFS=\\ ; set - $line ; unset IFS
    IFS="\" ; set - $line ; unset IFS
    IFS="\\" ; set - $line ; unset IFS

    $line contains the above string, what I want should be in $2, along with the .out.sent, which I can clean later. The second version didn't work at all, as I expected...it just quoted out the quote, throwing the script into conniptions.

    Any ideas?

    Rick Greene
    System & Database Administrator
    R&B Inc.
    3400 E Walnut Street
    Colmar PA 18915
    215-712-5171

    --
                 ---> 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: Rick Greene: "[HPADM] SUMMARY: ksh, IFS, and backslash"

    Relevant Pages

    • Re: Write File to Network Drive using Wi Fi connection
      ... Declare Function WNetAddConnection Lib "mpr.dll" Alias ... "WNetAddConnectionA"(ByVal lpszNetPath As String, ByVal lpszPassword As ... > been some traffic on doing this before, so check the newsgroup archives. ...
      (microsoft.public.dotnet.framework.compactframework)
    • Re: How to using getopt get value with space ?
      ... it would be much better to use 'getopts' rather than 'getopt' ... It's use in ksh scripts is therefore ... If the value of a variable expected to be an integer turns out to be a string, ... variable up to the recursion level. ...
      (comp.unix.shell)
    • Re: Force Reboot
      ... how do you search the archives? ... I know about is on the newsgroup page and that does not give the result you ... String, ByVal lnOutBufferSize As Long, ByVal lpBytesReturned As Long) As ... I see this posting in many places but it does not seem to work, ...
      (microsoft.public.windowsce.embedded.vb)
    • Re: bitwise shift in shell
      ... shell version). ... the $was already used for arrays and is ... why not using it for string. ... bogus way arrays are represented in ksh ...
      (comp.unix.shell)
    • File Information. Urgent!!!
      ... This is one of the archives that I am not obtaining to ... FileDescription: string; ... procedure FileVersiondescription(filename:string; var ...
      (borland.public.delphi.nativeapi)