![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| passing a variable inside a variable to a function | KingVikram | UNIX for Dummies Questions & Answers | 2 | 01-14-2008 08:28 PM |
| How to replace variable inside the variable | mani_um | Shell Programming and Scripting | 31 | 08-09-2007 11:56 PM |
| Replace variable with a user defined variable | ce124 | Shell Programming and Scripting | 1 | 04-15-2007 03:56 PM |
| Export command giving Variable Name vs the Value set for the Variable | ParNone | UNIX for Dummies Questions & Answers | 2 | 04-03-2006 12:43 PM |
| ksh: A part of variable A's name is inside of variable B, how to update A? | pa3be | Shell Programming and Scripting | 4 | 03-30-2005 12:29 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
the IFS variable
Hi all,
Ok os heres my situation. I have created a database style program that stores a persons info (name,address,phone number etc.) in a file ("database"). after i read in all the values above, i assign them to a line variable: line="$name^$address^$phonenum" >> phonebuk as you can see i am using my own delimeter ^. I specified that IFS=^ at the top of my script. the information, as u can see above, is being redirected into a phonebuk file which is acting as my "database". but heres my problem. when i cat my phonebuk with the IFS=^ at the top of my script, the output is as follows: name address phonenum (notice that there is no delimeter ( ^ ) ) but when i take out the IFS=^ at the top of my script, the output is as follows: name^address^phonenum why does the IFS remove the delimeter ^ from my database line? i need the delimeter in order to perform further operations on the information contained in the database like edit an individual field and so on. please help me. im in the stickiest situation since sticky the stick-insect got stuck on a sticky bun. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|