Tag Info

Hot answers tagged

4

bash offers the Ctrl+Alt+e shortcut (from the bash man page): shell-expand-line (M-C-e) Expand the line as the shell does. This performs alias and history expansion as well as all of the shell word expansions. Examples: ls Ctrl+Alt+e ls -aF --color !268 Ctrl+Alt+e ps -aef $PATH Ctrl+Alt+e ...


2

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


2

What you are seeing are the functions defined in your shell, which is very similar to the variables, and also part of your environment. Actually the environment variables were listed too - they came first, and scrolled out of the screen. Try this command to be able to scroll up and down in the whole result: set | less You can also search with / and ?. ...


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 $


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 && . ...



Only top voted, non community-wiki answers of a minimum length are eligible