I am sure about this but you could probably change $IFS to newline and then you should'nt have any problems...(Just remeber to restore $IFS to orig value at the end of your script).
Srinivasan Mohan Karuturi Networks Ltd ----- Original Message ----- From: "Vaibhav Kante" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 03, 2003 10:10 AM Subject: [LIH]shell script - record separator > hi, > > i am writing a shell script to import records from a > file and then operating on them one by one. The file > contains one record per line and each record also > constains few white spaces. So i have some thing like > this > --------- > for record in `cat record-filename` > do > ldapdelete $record > done > --------- > > But shell interpretes white space as a new record and > thus the command ldapdelete fails coz there is no such > record in ldap-database. > > Now how do i tell shell that all the records are > separated by a newline?? > > any help?? > > TIA > > VaIbHav > > > __________________________________ > Do you Yahoo!? > Yahoo! Calendar - Free online calendar with sync to Outlook(TM). > http://calendar.yahoo.com > > -------------------------------------------------------------------------- Karuturi Networks Ltd Phone : 0091-80-2351181/2/3 Bangalore, India Fax : 0091-80-2259782 http://www.e-karnet.net E-Mail : [EMAIL PROTECTED] (For Network Support, Mail [EMAIL PROTECTED]) -------------------------------------------------------------------------- Mail scanned at SMTP for most known viruses and disallowed MIME types. <[EMAIL PROTECTED]> ------------------------------------------------------- This SF.net email is sponsored by: eBay Get office equipment for less on eBay! http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ linux-india-help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/linux-india-help
