Register
It is currently Sat Dec 20, 2014 8:48 pm

making aliases work on your script


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Sun Sep 12, 2010 2:19 pm   

Joined: Wed Nov 26, 2008 7:43 pm
Posts: 50
Location: Texas
I've been wondering, how can you make your aliases and
functions that you have declared in your .bashrc or .Profile
work on a script you build.

I've tried this but it doesn't work:

#!/usr/bin/env bash
source ~/.Profile
sup # alias for svn up


Top
 Profile  
 PostPosted: Mon Sep 13, 2010 1:59 am   
User avatar

Joined: Tue Apr 27, 2010 2:28 pm
Posts: 172
Location: Czech Republic
man bash:
Quote:
Aliases are not expanded when the shell is not interactive, unless the expand_aliases shell option is set using shopt


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP