DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 31st March 2012
sw2wolf sw2wolf is offline
λ programmer
 
Join Date: Mar 2012
Location: China
Posts: 89
Thanked 0 Times in 0 Posts
Default Why cannot the alias be found ?

Code:
$ cat /etc/profile | grep -i pkg_list 
alias pkg_list='lynx -dump $PKG_PATH/index.txt >$HOME/pkglist.txt'

$ pkg_list
ksh: pkg_list: not found
Sincerely!
Reply With Quote
  #2   (View Single Post)  
Old 31st March 2012
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,879
Thanked 190 Times in 160 Posts
Default

sw2wolf, I assume from your explanation in the following:

http://www.daemonforums.org/showpost...88&postcount=5

...means you have identified the problem as being associated with the mirror used, & now your alias is no longer questioned.

In the future, please take the time to fully explain whatever issues you may be encountering. All we have to go by are your descriptions, & taking such severe shortcuts in explaing the problem makes it difficult to impossible for your readers to understand what you are experiencing.

Last edited by ocicat; 31st March 2012 at 04:48 PM. Reason: grammar
Reply With Quote
  #3   (View Single Post)  
Old 1st April 2012
sw2wolf sw2wolf is offline
λ programmer
 
Join Date: Mar 2012
Location: China
Posts: 89
Thanked 0 Times in 0 Posts
Default

sorry for my poor English. But it is not the same question.

Here, if i run `alias pkg_list='lynx -dump $PKG_PATH/index.txt >$HOME/pkglist.txt' ` at command line, then i can run pkg_list. However, if i put it in /etc/profile, then there is no pkg_list available.

Sincerely!
Reply With Quote
  #4   (View Single Post)  
Old 1st April 2012
puffy
-Guest-
 
Posts: n/a
Default

aliases belong in your ~/.kshrc or /etc/ksh.kshrc file. Only environmental variables go in /etc/profile.
Reply With Quote
  #5   (View Single Post)  
Old 1st April 2012
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,142
Thanked 182 Times in 149 Posts
Default

@puffy: You can define aliases in your "~/.profile", that is not the problem

@sw2wolf. Make sure you have this in your ~/.Xdefaults file:
Code:
$ cat .Xdefaults                                                                   
XTerm*loginShell:true
This will make a new xterm shell read the ".profile" file and thus find the aliases you defined.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #6   (View Single Post)  
Old 1st April 2012
sw2wolf sw2wolf is offline
λ programmer
 
Join Date: Mar 2012
Location: China
Posts: 89
Thanked 0 Times in 0 Posts
Default

@J65nko
thanks, it works now.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
declare same alias twice, alias values are different, why ? cq04cw Programming 5 29th March 2011 01:24 PM
How to make delays between multiple commands in an alias (ircII) guitarscn Programming 3 23rd September 2010 12:36 AM
Changing MAC address to an alias interface? DNAeon FreeBSD General 6 20th January 2009 04:48 PM
Mounting NAS as apache alias directory Yuka FreeBSD General 7 18th July 2008 02:58 PM
ip alias confusion hamba FreeBSD General 2 5th June 2008 10:23 AM


All times are GMT. The time now is 10:58 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick