LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-20-2003, 04:08 PM   #1
infamous41md
Member
 
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
setting IFS variable


im trying to set my IFS variable so that it interprets / as delimter. but i cannot get it to work. i do export IFS=' /' ; and when i do a declare and look at IFS value it is indeed ' /' . but when the it doesnt interpret commands the way i thought it would. like when i have execute a script like this:

#!/bin/bash

/home/me/hello

- it should remove the / and then try to execute the command home instead of hello, can someone tell me what im doing wrong? i have been googling this for hours unsuccesfully.
 
Old 05-20-2003, 05:03 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
that won't set IFS as the call to bash will create a brand new shell with reset variables and such. you will need to export the IFS variable to have it available everywhere.
 
Old 05-20-2003, 06:12 PM   #3
infamous41md
Member
 
Registered: Mar 2003
Posts: 804

Original Poster
Rep: Reputation: 30
yep, figured out but thanks for the reply
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
environment variable setting chii-chan Linux - General 5 01-23-2009 07:29 PM
Setting an environmental variable maevious Linux - Newbie 6 11-24-2005 04:15 PM
setting environment variable kb_ganesh Ubuntu 3 09-10-2005 01:58 PM
Setting of LANG variable r_213 Linux - General 7 01-06-2005 12:46 AM
setting path variable shahrahulb Linux - General 2 07-30-2003 08:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration