[HPADM] ksh, IFS, and backslash
From: Rick Greene (RGreene_at_rbinc.com)
Date: 06/27/03
- Previous message: Ernesto Freyre Ramírez: "[HPADM] RV: error starting HP-UX"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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)
- Previous message: Ernesto Freyre Ramírez: "[HPADM] RV: error starting HP-UX"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|