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

learn more… | top users | synonyms (1)

1
vote
2answers
303 views

Basic script listing directories ([: discover: unexpected operator)

I encounter an issue running a basic script listing directories. for item in * do if [ -d $item ] then echo $item fi done The outcome: lists all system folders returns an error: ...
1
vote
1answer
276 views

Bash alias permanent <without running bash or . ~/.bashrc>

I'm used to putting my alias in .bashrc, but Ubuntu suggests putting them in .bash_aliases. So that's fine, I put my alias there in the .bash_aliases file. However I want to run my aliases once I ...
1
vote
1answer
254 views

special character and parsing BUG - Bashscript

Failed to parse arguments: Argument to "--command/-e" is not a valid command: Text ended before matching quote was found for ". (The text was '"cpulimit') this is what i get when i run the following ...
1
vote
2answers
84 views

How to create a bash file allowing a folder from CD be transferred to Documents?

i want to transfer the myfiles folder from CD to Documents in a more decent way of transferring. I think creating an executable bash file is better. this bash file when clicked will allow the ...
1
vote
3answers
5k views

Init.d startup script not working for No-IP

I have just installed No-IP on a brand new Ubuntu 12.04 install. The program starts fine when I start it from the CLI, but if I try to make this startup script work it won't start. I got this script ...
1
vote
1answer
133 views

Unity Icon for a bash ran program

So I downloaded the .tar.gz for eclipse, extracted and set it up. I created a .desktop file so I could dock it in unity. I then want to be able to have a bash script open the program from the ...
1
vote
1answer
1k views

Why we can't run commands with gnome shortcuts?

When I make a custom shortcut with gnome (gnome-control-center keyboard) I can't set it to a command. Why? Example: I can't set a shortcut for sudo apt-get update. Instead I must first invoke a ...
1
vote
3answers
4k views

Can I create an SSH login script?

I have to log in to my school's Linux server for homework. I would like to be able to make a script or something for my desktop to save a bit of time (using Ubuntu desktop). Currently I log in using ...
1
vote
3answers
369 views

Script to move pictures

How can I write a script that will move all .png .svg .gif files from /home/eric/Desktop to /usr/share/icons?
1
vote
1answer
1k views

.bash_login not executing

I've put a .bash_login file in my $HOME-directory but it doesn't execute. I've also tried .bash_profile but also doesn't work. There are also .profile .bash_history .bash_logout Any idea? I'm ...
0
votes
0answers
35 views

getting error in opening py file [duplicate]

I'm installing a software in Ubuntu 12.04 and got the following error: http://paste.ubuntu.com/7638369/ server@ubuntu:~/Desktop/revkit-1.3$ ./tools/gui/gui.py Traceback (most recent call last): ...
0
votes
1answer
306 views

Execute script in sh mode instead of bash in Shell

I added my script called mylovelyscript.sh to /bin/ folder. My script contains code that echos text with different text colors. But when I run my script like $ mylovelyscript it executes in bash ...
0
votes
3answers
112 views

Strange autocompletion behavior

Well...I'm so confused, cause the only real problem in my case is freaking apostrophe ('). Situation: expanding PATH variable influence word completion, based on whether was apostrophes in additional ...
0
votes
1answer
334 views

bash: /home/gaja/.bashrc: line 4: syntax error near unexpected token `('

When I open the Terminal I got the following the errors. bash: /home/gaja/.bashrccu: No such file or directory bash: /home/gaja/.bashrc: line 4: syntax error near unexpected token (' bash: ...
0
votes
1answer
2k views

Double-click on .sh file to open terminal and execute series of commands in it?

I'm trying to double click on a file that does this: #!/bin/bash #Mount USB Jump, Copy files to it, Unmount it. [open terminal (so that I can see what 's going on)] pmount /dev/sdc JUMP sleep 2s cp ...
0
votes
2answers
207 views

Logging of commands executed in Bash

Sometime back, we had a requirement to log commands run on the terminal in the Bash shell. This was solved by means of a startup script with essentially the following contents: #!/bin/bash ...
0
votes
1answer
153 views

run a script as non-root user

I want to run a script say some_script.sh(that requires root permissions, contains some sudo do something in a for loop) as non-root user. I have a script as shown below. I want to run this script as ...
0
votes
1answer
120 views

Why does the script list directories starting with uppercase first, and all-lowercase second?

The thread is an extension of: Basic script listing directories ([: discover: unexpected operator) When I execute the script: for item in * do if [ -d "$item" ] then echo "$item" fi ...
0
votes
1answer
3k views

How to reset .bashrc file which edited before to set PATH ANDROID sdk

bash: export: `/home/entw/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local /bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/bin': not a valid identifier bash: /home/entw/.bashrc: line 111: ...
0
votes
1answer
187 views

How can I execute scripts as root without pointing to its location?

I tend to use sudo arp-scan --localnet --interface wlan0 a lot, but I find it cumbersome to type this each time. To speed things up, I've created a script, called arp-lw-scan, which should do this for ...
0
votes
2answers
336 views

History list without timestamp and unique the results

Using bash, I save my history with the timestamp. How do print the history omitting the timestamp? alias h=history alias g=grep -i To find lines that I used for heroku, I type: > h | g ...
0
votes
1answer
1k views

What is this PS1 variable doing in .bash_profile file?

Currently my terminal prompt looks like: blankman-MacBook-Pro:~ $ My .bash_profile has: export PS1="\[\033[36m\]\h:\W \[\033[33m\]\$(parse_git_branch)\[\033[00m\]\$(git config ...
0
votes
3answers
1k views

Launch two processes and return first process to the foreground so it can be killed with ctrl-c

I am launching two processes in a bash script: run_webserver xdg-open http://$(hostname)/dev-environment The run_webserver is an ongoing process, so I need to be able to kill it with ...
-1
votes
2answers
77 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 ...
-1
votes
3answers
3k views

Writing a bash script to copy all files between user specified directories! [closed]

I need a shell (bash) script that can copy all files from one directory to another; where the source and target will be specified by the user calling the script. Could someone help me with this?
-1
votes
2answers
1k views

To write a batch processing script which runs on bash

How to convert your java program so that it runs as a batch program i.e it can be run like a command in the ubuntu or any linux machine. What is the procedure and what are the steps to follow? ...
-3
votes
2answers
586 views

Help with bash script with text

I'm new in bash scripting and need help with the following please: The purpose of this homework is to let students write programs in bash scripting language that enable them to manipulate data in a ...