Error when opening Terminal - unix

The following line appears as soon as I open terminal. What does this mean?
-bash: exort: command not found

This must be because in your ~/.bash_profile, ~/.profile, etc. there is a line saying exort instead of export.
Look for it in your home directory with:
grep "exort" ~/.*

I have no idea what exort is - perhaps a misspelling of export? To track down this error, you'll need to examine your login scripts. You can use a text editor (i.e. vi) to view the files in question and search for exort. I recommend looking in the following files, if they exist:
~/.bashrc
~/.bash_profile
~/.profile
/etc/bashrc
/etc/profile
/etc/profile.d/*

Related

Run jq command in git-bash

jq command not found after adding jq executable
installing jq on git bash
My usecase is more similar with above shared references. I tried to execute a hook that needs to parse a json file. When hook gets executed it throws bash: jq:command not found error. So. I downloaded jq-win64.exe file and copied it to /usr/bin in Git folder. Then from git-bash I run export PATH=$PATH:"/C/Program Files/Git/usr/bin/jq-win64.exe" command and there is no error but when I checked jq --version command it still shows bash: jq:command not found error
Am I missing something? I even tried in windows cmd but is of no use. Hope someone can help me.
Thanks in advance!!!
PATH contains directories. That means what you should do:
Rename jq-win64.exe to jq.exe or just jq. (e.g. cp ~/Downloads/jq-win64.exe /usr/bin/jq).
You don't have to export your path, /usr/bin is already part of it.
If you didn't rename the file to jq (or jq.exe), then you would have to run it as jq-win64 in your console.
You could also put the binary into ~/bin folder, which should be part of PATH too. If it isn't, you can add it. Then you don't need to mess with your global binaries folder.

qhelpgenerator with doxygen keep showing sh : 1 permission denied

I want to use doxygen to generate a qt supported .qch file.
I set up all parameters like GENERATE_QHP, QCH_FILE ,QHP_NAMESPACE in .cfg file, also, I set
QHG_LOCATION = "/home/marty/Qt5.14.0/5.14.0/gcc_64/bin/"
When I called doxygen project.cfg, the .html document was successfully created. But when it came to qhelpgenerator, it showed:
Running qhelpgenerator...
sh: 1: /home/marty/Qt5.14.0/5.14.0/gcc_64/bin/: Permission denied
error: failed to run qhelpgenerator on index.qhp
lookup cache used 2501/65536 hits=17469 misses=3200
finished...
I tried chmod 777 qhelpgenerator, index.qhp and the relevant files that I can think of, and ran
sudo doxygen project.cfg
the problem still existed. It has already bothered me a whole day.
Any ideas what might happen?
The documentation for QHG_LOCATION reads:
The QHG_LOCATION tag can be used to specify the location of Qt's qhelpgenerator. If nonempty doxygen will try to run qhelpgenerator on the generated .qhp file.
I think that the word QHG_LOCATION together with the description is a bit misleading here, it should include the name of the executable (analogous to e.g. HHC_LOCATION).
(Note: when starting external you can use doxygen -d extcmd to see which external commands are attempted to be started).

Errno 2 No Such file or directory Sass not compiling in subilme text 2

I've found a few related posts but none match my specific problem and I think i've tried everything.
This is the error I get:
[Errno 2] No such file or directory
[cmd: [u'sass', u'--update', u'/Users/ryanwaters/Code/raw_portfolio/public/css/stylesheet.css.scss:/Users/ryanwaters/Code/raw_portfolio/public/css/stylesheet.css.css', u'--stop-on-error', u'--style', u'compressed']]
[dir: /Users/ryanwaters/Code/raw_portfolio/public/css]
[path: /usr/local/bin/sass]
[Finished]
When I put which sass in command line I get /Users/ryanwaters/.rvm/gems/ruby-1.9.3-p429/bin/sass
I've changed the pass several times and still can't figure out what the problem is
This seems pretty simple, but my problem was that I upgraded my mac's OS to Yosemite. I must've done something wrong, because my sass installation didn't carry over.
So, Sublime was throwing this error because it couldn't find sass. I reinstalled it, and everything worked as before.
This question is nearly an exact duplicate of SASS won't build in Sublime Text 2 [Errno 2] No such File or Directory from several days ago. If you look at my answer there, you'll see that you need to change the path to sass. You can either edit your SASS.sublime-build file and change the "cmd": line to point to /Users/ryanwaters/.rvm/gems/ruby-1.9.3-p429/bin/sass, or you can make a symlink to it in one of Sublime's default search directories, like /usr/local/bin or /usr/bin.
I had to manually specify the "path" and "gemPath" settings in the User Settings file for SassBeautify (e.g. "/Users/username/Library/Application Support/Sublime Text 2/Packages/User/SassBeautify.sublime-settings"). .
Here are the exact steps I followed to resolve the issue:
(derived from the documentation in the package repository).
Open up a terminal
Run: echo $PATH
Copy the entire output of that command
Open the SassBeautify settings file ("Preferences" -> "Package Settings" -> "SassBeautify" -> "Settings – User")
Paste the previously copied output wrapped in quotes into the 'path' setting (or add a "path" setting if it doesn't already exist)
Go back to your terminal and run: echo $GEM_PATH
Copy the entire output of that command
Go Back to the settings file
Paste the previously copied output wrapped in quotes into the 'gemPath' setting (or add a "gemPath" setting if it doesn't already exist)
Save the settings file and restart Sublime Text
Here's a screenshot of my SassBeautify settings file for reference:

How do I get vim's :sh command to source my bashrc?

Whenever I start a shell in vim using :sh, it doesn't source my ~/.bashrc file. How can I get it to do this automatically?
See :help 'shell'. You can set this string to include -l or --login, which will source your .bashrc file. So, you might have a line like this in your .vimrc:
set shell=bash\ --login
Note that this will alter everything that invokes the shell, including :!. This shouldn't be much of a problem, but you should be aware of it.
The value of this command can also be changed by setting the $SHELL environment variable.
If it doesn't source your .bashrc file, it may still source your .bash_profile file. I usually make one of them a symlink to the other. If your .bashrc performs some particularly odd one-time operations, you may have to edit it to only perform those operations with a login shell, but I've never had problems with it.
~/.vimrc
cmap sh<CR> !bash --login<CR>
If you quickly enter "sh<Enter>" in command-line, you can start bash with sourcing ~/.bashrc. So dirty.

Unix: Getting Export PATH to "Stick"

When setting the export path in Unix, example:
export PATH=$PATH: $EC2_HOME/bin
If I quit terminal and open it back up to continue working, I have to go through all the steps again, setting up the paths each time.
I'm wondering how I can set the path and have it "stick" so my system knows where to find everything the next time I open terminal without having to do it all over again.
Thanks!
Open ~/.bashrc. This file is loaded every time you start up a new shell (if you're using Bash, which most people are). If you're using a different shell, the file may have a different name, like ~/.shrc.
Add the line you need to the bottom of the file:
export PATH=$PATH:$EC2_HOME/bi
Other info rolled up from elsewhere in the thread:
There are multiple places to put this, depending on your shell and your needs. All of these files are in your home directory:
For Bash:
.bashrc (executed when you shart a shell)
OR
.bash_profile (executed when you log in)
For csh and tcsh:
.cshrc
For sh and ksh:
.profile
Add it to your .cshrc file (for csh and tcsh), .profile file (for sh and ksh), or .bash_profile file (for bash)
You need to find your profile file and put that line in there. Suppose you use bash, the profile files are .bashrc and .bash_profile, found in ~. These files will vary depending on which shell you use.
You have to put those commands into one of the "autostart" files of your shell.
For bash this would be .bashrc in your homedirectory (create it if necessary)
add it to your .bashrc or another .bash startup file.
... and for ksh edit .profile.

Resources