Tag Info

New answers tagged

-1

IF you want to run your scripts with the command: android-studio <scriptname> You can also do the following: Save the script below in ~/bin as android-studio (no extension), make it executable. #!/usr/bin/env python3 import sys import subprocess scriptname = sys.argv[1] path = "~/Developer/android-studio/bin" subprocess.call(["/bin/bash", ...


0

It sounds like you want to do PATH="$PATH:~/Developer/android-studio/bin" Then you'll be able to enter android-studio from anywhere. There's nothing magical about an environment variable named AS If you want a shorthand, add a function to your .bashrc: function as() { command android-studio "$@"; }


0

Is /OPENNLP_HOME/bin the actual path of of opn_nlp? What is the output of the below command? echo $OPENNLP_HOME You first need to do: export OPENNLP_HOME="Path TO OpenNLP Folder" export PATH=$PATH:$OPENNLP_HOME/bin


1

As report in XDG Base Directory Specification environment variables aren't set by default bug, Ubuntu doesn't set XDG variables. According to FreeDesktop Base Directory Specification: $XDG_DATA_HOME defines the base directory relative to which user specific data files should be stored. If $XDG_DATA_HOME is either not set or empty, a default equal to ...


0

I'd suggest escaping the dollar scp file host2@host2_adress:"\$FOO"


2

Add the exports to your ~/.profile, that way they are loaded on every login. Relevant: https://help.ubuntu.com/community/EnvironmentVariables


7

Why Lower-Case $user Doesn't Work To clarify and expand upon what others have said, shell and environment variables are case-sensitive. user and USER are different variables, so their contents (which $user and $USER expand to, respectively) may be different. Typically, no variable called user is defined and $user is expanded to nothing, while what you want ...


2

Please use $USER instead of $user. sudo chown $USER -R /usr/bin/.folder/


2

The user variable is probably empty. Try $USER.


0

but after setting the environmental variables It looks like you did not do that correctly. The errors you're getting mean that the paths (like /home/john/android) are being used as the names of variables, rather than as the values assigned to them. The correct syntax to assign a variable is NAME=value. The correct syntax to export a variable (with ...


2

TL;DR: Put your export commands in .profile instead, remove or rename .bash_profile, and log out and back in to apply your changes. How the Per-User "profile" Files Are Used Most desktop environments are configured, by default, so that the .profile file in your home directory is sourced when you log in graphically. It sounds like you're using Ubuntu's ...


0

Both paths should have /usr/bin which is where apt-get normally lives in Ubuntu 14.04. You can check where it is in your filesystem: locate apt-get, or you can go there and make sure it is actually where you expect it to be: ls -l /usr/bin/apt* If that checks out, double check what your path is actually set to: echo $PATH and set it again if somehow ...


1

At As you use ssh connection , try to add your user in the "audio" group : sudo usermod -aG audio username reboot and test that alsamixer is ok , so you can set volumes: Probably you have to press F6 to select the 3rd device. Then,in my case, I can read sound connected by ssh on a remote pc without X server using: cvlc ( which comes with vlc-nox ...


1

You are supposed to export the variable, not its value. I.e. export LD_LIBRARY_PATH not export "$LD_LIBRARY_PATH" Edit (example): $ LD_LIBRARY_PATH='/usr/share/My Company, Inc/ProductName' $ export LD_LIBRARY_PATH $ env | grep LD_ LD_LIBRARY_PATH=/usr/share/My Company, Inc/ProductName $


2

numberoflines=$(sed -n '$=' /tmp/lines.txt)


0

To do that you can add following in your ~/.bashrc file . WEEK=/path/of/your/dir/ Open ~/.bashrc file using gedit ~/.bashrc and add above in it an save it. Now you can use cd $WEEK to cd your folder


1

Just write a script: #!/usr/bin/env bash PACKAGE_PATH=/home/userA/package1:/home/userA/package2:$PACKAGE_PAT‌​H cd /home/userA/scripts ## You need to source this script if it defines variables. Otherwise ## the variables won't be available to your main script. '.' is the same ## as 'source' but more portable to different shells. . varset.sh && . ...



Top 50 recent answers are included