.bash-profile

Cannot edit bash_profile on Mac OsX [closed]

大兔子大兔子 提交于 2019-12-04 10:08:59
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . I am using MacOSX Snow Leopard 10.6.8.... I am the only user on this machine and I should be admin. I trying to edit my bash_profile to give it this simple alias: alias server=' open http://localhost:8000 && python -m SimpleHTTPServer' however when I use the terminal and type: vim ~/. bash_profile and paste in

Cannot find main class on Linux - Classpath issue

一曲冷凌霜 提交于 2019-12-04 06:12:56
问题 I am having some trouble running a few jar's on a linux box. Basically, I am getting an error saying it cannot find the main class of my main jar. The class is defenetly present so it must be a classpath issue. I am not great with linux, so I am looking for some advice as to where I might be missing something. First off, I am setting the classpath in the users bash_profile; adding all the jar's required, seperated by a : delimeter. I then export the classpath. Then, in the shell (ksh) script

.bash_profile aliases: command not found

笑着哭i 提交于 2019-12-04 00:22:37
问题 I cannot get my .bash_profile aliases to work on my Mac OSX Terminal. I created a .bash_profile file in my ~/ directory, then wrote two lines: echo bash profile has loaded alias prof=“open ~/.bash_profile” I saved and entered in Terminal command: . ~/.bash_profile Terminal displayed: bash profile has loaded -bash: alias: /Users/kennethlarose/.bash_profile”: not found I've been reading up on alias profiles, and I believe my syntax is valid. I know the profile is sourcing because it displays

Why do I need to source bash_profile every time

こ雲淡風輕ζ 提交于 2019-12-03 13:58:45
问题 I have installed Hadoop and every time I want to run it, first I have to do this: source ~/.bash_profile or it won't recognize the command hadoop Why is that? I am on OSX 10.8 回答1: Now that we've narrowed down the problem: Run ps -p $$ at the command line to determine that you are, in fact, using a bash shell. Realize that you are in zsh, which means you should be editing your profile in .zshrc . Copy the offending lines from .bash_profile to .zsh , OR Modify your .zshrc to directly source

Bash prompt history issue

拥有回忆 提交于 2019-12-03 09:15:29
问题 This is a weird one that I haven't been able to find a good answer with Google (of course there's always the possibility that I just fail at that). On my bash prompt, if I color a part of the prompt, when I hit 'up' to go to a previous command, I can't go to the start of the line after it's past a certain amount of characters (specifically 31). My current bash prompt is this: (colors are defined earlier in my .bashrc) PS1="[\u@$cyan\h$NC \w] " But if I change it to this: PS1="[\u@\h \w] " It

Setting path in bash_profile

耗尽温柔 提交于 2019-12-03 06:45:10
Why does setting a PATH require the :${PATH} at the end? PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}" When I append a path to this I would do PATH=$PATH:... How do I append a PATH without going to a new line. That is, how would I append a PATH to the original PATH statement. If I wanted to put the following all in the first line, for instance. How does this interact with the :${PATH} part? PATH=$PATH:/usr/local/mysql/bin There's a difference between appending an existing path to the front or the end of the $PATH environment variable. The way bash resolves execution

Cannot edit bash_profile on Mac OsX [closed]

冷暖自知 提交于 2019-12-03 05:03:35
I am using MacOSX Snow Leopard 10.6.8.... I am the only user on this machine and I should be admin. I trying to edit my bash_profile to give it this simple alias: alias server=' open http://localhost:8000 && python -m SimpleHTTPServer' however when I use the terminal and type: vim ~/. bash_profile and paste in this alias I get message saying I cant save due to permissions. So then I show all hidden files and go to fix the permissions on this file but the file is all grayed out.... I cant change anything. What can I do?? You need to open it with sudo. sudo vim ~/.bash_profile The file appears

Batch Build and Archive of iOS apps via Terminal

别来无恙 提交于 2019-12-03 03:13:53
I am trying to simplify the build->archive->submit process for iOS app publishing. We have over 50 mobile apps that have nearly identical framework, but with different artwork and configuration settings. I normally would load each project in xcode 4.2 and build->archive->submit the usual way with the xcode GUI, but we are up over 50 apps now and this process is very tiresome any time we push out an update. That being said, I am trying to speed up this process with using a shell function. I did plenty of research and found that xcodebuild (See Reid's answer) should work, however the Archive

Why do I need to source bash_profile every time

北慕城南 提交于 2019-12-03 03:12:46
I have installed Hadoop and every time I want to run it, first I have to do this: source ~/.bash_profile or it won't recognize the command hadoop Why is that? I am on OSX 10.8 Now that we've narrowed down the problem: Run ps -p $$ at the command line to determine that you are, in fact, using a bash shell. Realize that you are in zsh, which means you should be editing your profile in .zshrc . Copy the offending lines from .bash_profile to .zsh , OR Modify your .zshrc to directly source your .bash_profile . UPDATE: Do what @TC1 mentions in the comments and keep the shell-specific code in each

sudo open -e ~/.bash_profile Permission denied mac

ε祈祈猫儿з 提交于 2019-12-03 01:38:57
I am trying to edit bash_profile file to add path to my sdk through the following command on my mac machine. sudo touch ~/.bash_profile; open -e ~/.bash_profile It opens the file in TextEdit but does not allow me to edit it. Though i have given super-user permission and password while running the above command. It is giving me following message when i try to edit it. "You don’t own the file “.bash_profile” and don’t have permission to write to it. You can duplicate this document and edit the duplicate. Only the duplicate will include your changes." I am new to mac. So please elaborate your