Find the answer to your Linux question:
Results 1 to 4 of 4
I'm trying to use unalias in a script and it won't work, but when I do it on the command line it works...?? any help would be awesome!...
  1. #1
    Linux Newbie
    Join Date
    Sep 2006
    Location
    Arizona
    Posts
    123

    alias unalias help

    I'm trying to use unalias in a script and it won't work, but when I do it on the command line it works...?? any help would be awesome!

  2. #2
    Linux Newbie
    Join Date
    Sep 2006
    Location
    Arizona
    Posts
    123

    Getting closer

    I've figured out that when you create an alias, its scope is for the shell it was created in. So is there a way for my script to tell the shell that started my script to perform the unalias rather than trying to do it itself??

  3. #3
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    use 'export' before 'unalias' command.




    casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  4. #4
    Linux Newbie
    Join Date
    Sep 2006
    Location
    Arizona
    Posts
    123

    hmm

    I tried sourcing my script in with "." and it worked

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...