Bash is the shell used in Ubuntu's command-line interface.

learn more… | top users | synonyms (1)

0
votes
2answers
41 views

Redirecting output to std output or /dev/null depending on optional parameter

I have a script where you can run it just like this ./myscript and the output of some commands called inside the script are hidden, just like this: if mvn tomcat:deploy &> /dev/null; then ...
1
vote
1answer
34 views

Changing current directory to directory that have identifier as the substring

My terminal is currently in the home directory, and the home directory contains a directory which have "round" as the substring. Is there any way to directly change to that directory without typing ...
2
votes
1answer
47 views

What do the '?', '.' and '+' symbols mean when I run 'who -aH'?

What does the plus sign (+), question mark (?) and period (.) mean in the idle column when I run who -aH? I tried Google, but the results are all about regular expression and wildcards. EDIT: I ...
5
votes
2answers
184 views

Hiding output of a command

I have a script where it checks whether a package is installed or not and whether the port 8080 is being used by a particular process or not. I am not experienced at all with bash, so I did something ...
1
vote
2answers
37 views

Running shellscript with cronjob is making problems, executing manually not. Ideas?

I made a shell script called /home/root/cron_grads.sh (chmodded 755) on my server. In this directory are more grads-scripts like 500hPa_p0.gs (644). My main script creates a temporary file ...
1
vote
2answers
34 views

how can i find all files that contain embedded crc32's

how can I find all files that contain embedded crc32's e.g. Mydocument190_[F285E17D].pdf using the find command to clarify the crc32's are always within brackets [F285E17D] and the file names may ...
1
vote
1answer
14 views

Install bashmark on ubuntu 12.04

I followed the instructions at this page: http://www.huyng.com/projects/bashmarks/ to install bashmark on ubuntu. I have not understood what the guide mean with "add source ~/.local/bin/bashmarks.sh ...
7
votes
4answers
439 views

How to check the process is already running or not

I want to check the particular process in already running or not. I refereed this Q&A. But I didn't get any specific solution. Following is the example that I tried: I have created abc.sh file ...
1
vote
2answers
98 views

How to create a script which opens the browser and logins to a particular Gmail account?

I have created a bash script login.sh. I want it to open the browser and login to my Gmail account. I tried using the following command to open the browser with www.gmail.com. xdg-open ...
20
votes
4answers
3k views

Why does “A=10 echo $A” not print 10?

This command: A=10 echo $A prints an empty line. Why not 10? Why doesn't the in-place temporary environment setting work? I want to know the reason and explanation rather than solution. I used ...
1
vote
2answers
60 views

bash: config.sh: No such file or directory

Whenever I open my terminal, it displays bash: config.sh: No such file or directory followed by the command prompt in the next line. My .bashrc file contains: source config.sh I mainly use Ubuntu ...
0
votes
1answer
61 views

Bash script not adding variables to session [duplicate]

I have a bash script that I have added as a startup application. It does a bunch of exports and alias assignment. #! /bin/bash alias devhm='cd ${DEV_HOME}; ll'; alias wlhm='cd ${WL_HOME}; ll'; alias ...
15
votes
4answers
1k views

Why does terminal auto complete sometimes not suggest anything for the `services` command?

Sometimes, when I type a command on the terminal, the terminal's autocomplete does not work, even if my command is not wrong. For example, take look to this: sudo service vsftpd status sudo and ...
1
vote
1answer
48 views

How do I read values from CSV into a script? [closed]

I want to write a script that reads a URL from a .csv file, gets the whois data, then goes to the next URL in the list. #!/bin/bash whois $URL &> "$URL.txt" How do I get the $url, and run ...
3
votes
1answer
36 views

Destroy a juju service and also its associated machine

I'm looking for a way to automatically destroy the associated machine after destroying a service with: juju destroy-service [service_name] I know I can do: juju destroy-machine --force ...
0
votes
1answer
30 views

How to set bashrc shell environment

I would like to add _ENV to my bash so once I ssh to the server it shows something like this: [live][root@server ~]# or [dev][root@server ~]# How can I do this? I have been looking everywhere ...
0
votes
1answer
48 views

Permission error trying this backup script

I am trying this Backup Shell Script from the server guide. Granted it's for my desktop running Xubuntu 14.04. The NFS is mounted and accessible. The script has been created and edited with the ...
2
votes
2answers
113 views

How can I compare two directories recursively and check if one of the directories contains the other?

I have two directories, they contain common files. I want to know if one directory contains the same file as the other. I found a script on the net but I want to need improve it to do recursively. ...
1
vote
2answers
78 views

installing rvm in 12.04 ubuntu which is on virtualbox

I have tried a lot of methods but cant get this done. I am trying to install rvm on 12.04 ubuntu. There has been many problems in past like this and I have referred as much as I can and still nothing ...
1
vote
2answers
71 views

What are the standard Environment variables ($) in Ubuntu?

I know some useful environment-variables like $HOME, $UID, $BASH, $LOGNAME etc. which is useful to get information in terminal/command-line with using echo(ex: echo $LOGNAME) I want to know what are ...
3
votes
1answer
295 views

What does echo with “>>” symbol do?

I've seen some command like echo '* - nofile 65535' >> /etc/security/limits.conf I know echo print something on the screen. and limits.conf was a file in that /etc/security path. But want ...
0
votes
0answers
19 views

Execute script as root on global hotkey independent of logged in user?

Desired scenario: Upon system boot, a bash script is loaded which listens for a specific global keypress, independent of logged in user, also listening in the lock screen. Upon a specific keypress, a ...
1
vote
1answer
221 views

How do I write a script to output an html file?

What am I doing wrong in this script? #!/bin/bash cat > /tmp/flash-viewer.htm <<- _EOF_ <HTML><HEAD><TITLE>Flash Viewer</TITLE></HEAD><BODY> <object ...
30
votes
6answers
2k views

Shortcut to clear command line terminal [duplicate]

Is there a shortcut to clear the command line when typing in it instead of keeping backspace pressed for a few long seconds? I ask because I regularly use the Tab key to automatically fill in file ...
0
votes
2answers
70 views

How to fix symbolic links after switching from Bash to ZSH

I had bash as my default shell even though I was only using zsh. I always started it myself by opening the terminal and typing zsh. Today I decided to use it as my default shell. So I found this ...
1
vote
3answers
226 views

Python command in bash does not find -c flag

I have two python lines in my bash script, both should run with -c flag, but once I run the Bash script it tells me that it could not find -c flag that is needed for python to run the command in Bash. ...
0
votes
0answers
32 views

Bash if password filled save it

I am trying to save a password to gnome keyring via python script. The python script will be runned from bash script if password is filled in zenity GUI. Example: User inserts hes/hers password to ...
23
votes
4answers
2k views

What is the meaning of $$1 in bash?

I am actually playing with arguments and its happened. I just thought like to see what will happen if I type $$1 and I did it and got something below. raja@raja-BONEFISH:~$ $$1 19301: command not ...
4
votes
3answers
454 views

Tomcat does not recognize JAVA_HOME

I've installed Ubuntu 14.04 Server, extracted JDK1.8u5 and Tomcat7, and added the following to .profile (I also tried adding it to .bashrc with similar [non-] results): export ...
1
vote
2answers
62 views

After being root, the custom .bashrc file no longer runs?

I modified my .bashrc file to customize my terminal. I modified the else PS1 statement to the one I needed and it works fine but when I login as root it switched back to the one it originally had. How ...
1
vote
0answers
48 views

Can you use gnome keyring in bash script, if yes then how?

I am developing a automated mounting script for Windows shares. I have finished the script and it works just fine, but is it possible to add Gnome Keyring to the bash so once user writes hes/hers ...
0
votes
2answers
33 views

argument-aware alias command?

I want to create an alias for curl which automatically writes the file it curls into a file with the same name in the current directory. For example: % curl https://bootstrap.pypa.io/get-pip.py ...
2
votes
2answers
154 views

Bash login script with zenity for CIFS mount

I am writing a mount script for Windows share to run after login. I have done it with bash and zenity and it works, but now I need to make it better so if username field and password field are empty ...
-1
votes
2answers
47 views

how do I enable ccache

I am completely noob at this, i don't know what the make file is, and I don't know what bashrc is. but i do know where to download source code and use source somebash.sh then make file (as was told ...
0
votes
1answer
33 views

How to get autocompletion with “>|”?

When trying to empty a text file with >| filename why doesn't bash's autocomplete work for the file name? Is there anyway to allow autocompletion like any other terminal command?
1
vote
2answers
51 views

How to use time command in bash, to sum sys + user time, and output it as milliseconds?

The time command returns a table like this? real 0m1.607s user 0m0.154s sys 0m0.032s I am running this inside a shell script. What's the simplest way to process time output so ...
1
vote
0answers
44 views

On Trusty, what is CL program to create desktop configuration file?

On Precise, I used to create a desktop configuration file with my own GUI wrapper which called the gnome-desktop-item-edit command line program (part of the gnome-panel package) which had the ...
1
vote
2answers
114 views

How to install RevKit

I’m trying to install a software called RevKit on Ubuntu 12.10 and the following instructions1 need to be followed: RevKit can be downloaded from the www.revkit.org website. Opening a Bash ...
1
vote
1answer
51 views

Get total diskspace usign du for multiple directories

I know about du -sh which gives me total disk space used for given directory. My problem is the directories I am interested are scattered in lot of subdirectories. I have right "find" command that ...
1
vote
1answer
32 views

Mapping Directories/path to another

Ok, so I have two programs which use the same MASSIVE data files, located in /public_mm/DB/ /public_semrep/DATA/DB/ Is it possible to map one of these paths to the other folder so I don't have to ...
0
votes
1answer
34 views

Script to open vlc with local ip and port

I am trying to create a script to open vlc with my local ip and port 8888. My current script: #!/bin/bash vlc http://10.0.0.1:8888/ This works fine, but when I go to another network the local ip ...
1
vote
0answers
56 views

Why is netcat remote shell not returning any output on ubuntu 12.04?

I'm connecting to a server I have on my laptop, both are on the same vmnet and both systems are Ubuntu 12.04 LTS. In order to connect I use reverse shell from the web sever. First I start listening ...
13
votes
4answers
597 views

Run last command with all the letters transformed to lowercase

Many times I have run a command with all the letters in uppercase (maybe because CapsLock was on), and I pressed Enter before realising this. How can I run the last command with all the letters ...
1
vote
1answer
54 views

How do I temporarily remove proxy settings?

I set my proxy settings using the following command export http_proxy=http://proxyusername:proxypassword@proxyaddress:proxyport When I do echo $http_proxy I get ...
0
votes
1answer
34 views

Locked out of my account

Ok, so I've been messing around with my linux installation, and I've really kind of messed up. I changed the ~/.gnomerc to open an application, but there was a problem: after it opened that ...
1
vote
1answer
38 views

How to set /usr/bin/i586-mingw32msvc-g++ to gww?

I use cross compiling for C++ using MinGW... I use /usr/bin/i586-mingw32msvc-g++ filename.cpp to compile, but I want to be able to type gww filename.cpp I think I need to set a PATH ...
2
votes
1answer
57 views

Detecting 404 Somehow

I keep my PC running at home. Sometimes, when I'm at work, my PC can't load the pages that I want to load. I have to ssh to it, and reboot/restart browser. It's really annoying and I'm trying to find ...
5
votes
1answer
165 views

Sequence of scripts sourced upon login

I would like to concentrate all my login config in my ~/.bash_profile. There was a ~/.bashrc there by default but I replaced it with a ~/.bash_profile. However, when I log in, something before my ...
1
vote
1answer
67 views

Keeping color from vim with grep

I like the way vim highlights the output from syslog. However, I only want the most recent outputs to be opened. I tried grep --color=always "$@" /var/log/syslog > /tmp/fileOUT vim /tmp/fileOUT ...
0
votes
1answer
103 views

Curl request not working

Can some help me out in this.? I tried making a curl to random web pages it works fine. This address mentioned below i tried via browser it also works but when i try this via shell it does not work. ...