Bash is the shell used in Ubuntu's command-line interface.
0
votes
1answer
23 views
Where are ALL ubuntu logs/terminal history stored
In what folders are the logs and key histories stored so that I may make a script to purge them. Is there a specific folder for the hibernation partition or a file by which it keeps the RAM data on ...
1
vote
0answers
75 views
Crontab not running a script
I have set my crontab to run 2 script.
the first script is not running.
I set up on the crontab -e not sudo crontab -e
The error i have is this
...
0
votes
1answer
22 views
Can't login to GUI, only to tty1-6, /bin is not included in the PATH environment
I was trying to make the brightness controls work after I had made a clean reinstall of Ubuntu 12.04 on my Gateway computer, based on this thread, and proceeded to restart because I also had a few ...
0
votes
1answer
24 views
When $SHELL variable does not change when I switch shell
I am using 'zsh' by default.
But when I am in my zsh shell, I enter 'bash' to switch to bash, why the $SHELL variable does not change?
Can I make screen to use whatever shell I right before execute ...
3
votes
1answer
36 views
Rsync behavior in a cron script
I have an nfs device that creates checkpoint (backups) everyday. I want to use Rsync to copy these checkpoints to another device (Drobo connected via iSCSI). So I've run the script on a single nfs ...
1
vote
2answers
35 views
No duplicated lines in bash history [duplicate]
Supposedly, adding export HISTCONTROL=ignoreboth to .bashrc would do the trick, but what I see in practice is there still exists duplicated lines in my .bash_history file.
You can see my .bashrc ...
0
votes
1answer
35 views
how to export bash arrays? any workaround tips?
I am using the bash version 4.2.37 at ubuntu 12.10. But since ubuntu 12.04 I am unable to export arrays in bash...
This is an example (type these lines in the command line, it is not a script):
...
2
votes
1answer
17 views
How can I get diffuse to play well with a Python virtualenv?
Diffuse is installed on my workstation and plays well with Mercurial so I often use it for diff'ing. However, I also am using a Python virtualenv to use some different modules in a more controlled ...
0
votes
1answer
10 views
How to build libHaru and the examples which are included
I downloaded libHaru from http://libharu.org/. libHaru is a opensource pdf creator. Now in the INSTALL file says I only have to run ./configure && make && make install. When I run this ...
0
votes
0answers
25 views
Environmental Variable for current domain
I'm using Ubuntu 12.04 LTS Desktop edition
I want to use environmental variable for currently joined domain just like i use $USER to bring current user.
From what i read there are few variables for ...
0
votes
2answers
52 views
/usr/bin/env: bash: Permission denied
Suddenly, when your Seniors Linux Server admin does not come at office. And Then Junior Linux Admin take a charge of it, then it is NIGHTMARE for them. Please help.
I'm not able to recollect, that ...
0
votes
1answer
30 views
Run a shell script as another user that has no password
I would like to run a script from the main ubuntu shell as a different user that has no Password.
I have full sudo priviledges, so I tried this:
sudo su -c "Your command right here" -s /bin/sh ...
2
votes
1answer
28 views
Change Gsetting with script on Logout
System :
Ubuntu Raring Ringtail (13.04) from fresh installation.
Purpose :
Main : Change gsetting (desktop wallpaper) with script on user logout.
What's I've Done : (carefully read)
I try to stop ...
2
votes
3answers
55 views
if condition on multiple lines in bash shell
I have a bash shell function that takes an argument and perform something on it if needed.
do_somthing() {
if [need to do something on $1]
then
do it
return 0
else
return 1
fi
}
...
0
votes
1answer
37 views
bash permissions
My friend was trying to tighten up security on his ubuntu server and changed the permissions on bash. He logged out, and now the computer won't let him log back in.
The server is an off-site server ...
-1
votes
0answers
26 views
tcl command somehow not properly installed? [closed]
here is ubuntu 12.10 (pearOS) and there seems to be tcl-package
double in container of ubuntu (2 different versions).
I made sudo apt-get install tcl tclx
quite normally (need this for sguild ...
1
vote
1answer
30 views
How to use readline to insert a predetermined string onto the command line with a shortcut when using Bash?
Is it possible to have an arbitrary amount of text placed next to the cursor on the command-line? I have heard that it is possible using Bash, but I am not sure how to accomplish it. It seems to be ...
0
votes
1answer
36 views
How to fake Ubuntu version number to applications
I'm trying to install Intel C++ compiler on Ubuntu 13.04, but the installation script says that only Ubuntu 12.10 and below are supported, and there is no option to force installation. So is there any ...
0
votes
0answers
19 views
Installing IRAF problem
I've installed iraf v216 on my desktop computer without any difficulties but installing it on laptop(HP pavilion g6) is giving me a lots of trouble.
I can't solve this particular problem, and I don't ...
0
votes
1answer
43 views
Macxchange Script to Change MAC and Hostname in ubuntu 12.04
I'm trying to adapt a script in backtrack to work with ubuntu. I keep getting an error on line 14 which is the "if [ $? == 0 ]; then" line
the script was found on
...
1
vote
1answer
35 views
Bash script reading text file - No such file Error
I'm writing a script to read a simple text file.
But I get only a "No such file" message.
The file exist and has proper access rigths
the code I'm using is:
Ficheiro="mensagem"
while read linha; ...
2
votes
1answer
108 views
Why doesn't this command work as an alias?
I've been using the following command to list the ten largest files, at any depth, under the current directory:
find -type f -size +10M -exec ls -gGsSh1 {} + | awk 'NR<=10 {print $0}'
(I use awk ...
1
vote
0answers
16 views
How to change bash title in a python virtual environment
I would like to know how to change the bash title modifying the configuration files.
I often program in Python and use virtualenv to keep my development environment separated
from the system-wide ...
0
votes
0answers
37 views
How can I make a command execute at startup?
I wanted to remap the keys for my page up and page down number pad so that they would actually act like the real page up and page down. I used the xmodmap successfully following the directions based ...
2
votes
1answer
35 views
How do I open screen with many tabs to execute some commands within each one
How to open screen with many tabs?
How can I execute some commands within each tab, plus giving the main screen window a name to call it again later to execute other commands?
For example, I have a ...
0
votes
1answer
33 views
Bash Script using a Firefox Profile to open URLs
Working on a script to automate some tasks in Firefox.
These tasks should run through a clean Firefox profile, so they are fast and don't interfere with any of my regular surfing.
#!/bin/bash
# ...
0
votes
2answers
31 views
Flatten directory with incrementing names
i need a bash script for flattern a directory with same names, and get an ordered output after a conversion.
input folder structure:
/in1/file1.wav
/in1/file2.wav
/in1/file3.wav
/in2/file1.wav
...
2
votes
2answers
42 views
Command line prompt looks strange in virtual console
In a terminal emulator like xterm my prompt looks like this:
[august@macmini ~]$
but in a virtual console the string ;linux is prepended to the prompt to make it look like this:
...
1
vote
1answer
45 views
What is the best directory for script files?
I have my own shell script files and I want to run them in terminal, keeping them in /usr/bin folder. But my question is: which directory is best for keeping files of my own script? I want to use this ...
1
vote
1answer
43 views
How to make a script passing his PID to another running script
i have a script which is the main one and this script open a new terminal and execute another script so what i want is to pass the PID of the second script to the first script
the main script
...
1
vote
1answer
93 views
Tell sed to make changes but those starting with a specific string in 8th to last line
Here again with another problem with sed.
As the title says, I want sed to change lines starting at the 8th line to the end, but only lines which start with <b>.
I have code all ready and ...
0
votes
1answer
35 views
How to write a script as a string and save it in variable ten echo it to any file during run time and execute it in a terminal
Here u are the code i want to do , the problem is the special characters i punt like / and then and those things while executing , it dont consider the text between those two parentheses () a string ...
1
vote
2answers
44 views
How to run two parts of codes of Bashscript simultaneously while one of them is infinite while loop
i have this bash script code and i want to run the read command side by side with the while loop as the read command fetch data from user and save it in some file and the while loop do checking on a ...
1
vote
3answers
67 views
How to execute some commands while background task of bash script is about to be killed
In case i run a script in terminal and it contains a background job , in case the user close the terminal as i guess the script with his all back ground tasks will be dead , i want something like an ...
0
votes
1answer
32 views
Cannot use bash tab complete in tmux
I just install tmux on Ubuntu 12.04 LTS and it throws me this error when I try to use tab completion for simple commands like 'cd' or 'mv' in the /etc/bash_completion file.
command substitution: line ...
-1
votes
0answers
23 views
Java SE installation error, line 86: ./install.sfx.8046: Permission denied [closed]
I tried installing jre-6u25 with the bin file. I've tried it with both 64-bit and 32-bit, and I get similar errors:
x86 bit
chronos@localhost /mnt/stateful_partition/opt $ sudo bash ...
0
votes
1answer
72 views
Error when installing RTL8188CUS wireless driver from sh: “/lib/modules/3.5.0-27-generic/build: No such file or directory”
I'm using 12.10, updated to this day. The Realtek USB Wi-fi dongle doesn't work. I've seen lots of discussions in forums that suggests downloading the official driver.
However, when I run "sudo bash ...
1
vote
2answers
58 views
How to read file starting from a specific number of line within the “while read ”?
All what i want is to specify a certain number of line like this lineNumberIs=3 and to tell while read to start out of this third line or what ever line number and fetching lines after wards to ...
0
votes
1answer
77 views
How to run a shell script without terminal
I have a shell command that executes a command and sends it through pipe to a python file. The python file does various checks on it and then starts processes with parameters using subprocess.Popen. ...
0
votes
1answer
15 views
Automatically load cdc-acm at boot
Hi I am trying to figure out how I can load the cdc-acm module at boot. I tried this command:
sudo bash -c echo hoi >> /etc/modules
but I get this:
bash: /etc/modules: Permission denied
...
0
votes
1answer
26 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 ...
0
votes
1answer
38 views
How to open many-tabbed Gnome terminal as one windown instead of many independent windows
aa=$( ps -e | grep "chrome" | awk '{print $1;}')
for i in $aa
do
gnome-terminal --tab -e" sudo cpulimit -p $i -l 35 "
done
i want to open one gnome window before the execution of the ...
1
vote
1answer
56 views
Modifying PATH does not work
I want to add /home/myname/adt-bundle-linux-x86_64-20130219/eclipse to PATH.
I edited .profile:
PATH="$HOME/bin:$PATH:/home/myname/adt-bundle-linux-x86_64-20130219/eclipse"
but it won't work. Why?
...
1
vote
2answers
39 views
trivia bug in bash script
#!/bin/bash
aa=$( ps -e | grep "chrome" | awk '{print $1;}')
for i in $aa
do
gnome-terminal --tab -e" sudo cpulimit -p $i -l 35 "
done
when i run it i get error missing argument e
i ...
0
votes
0answers
32 views
build/main.mk always fails Ubuntu Touch Porting
Okay, now I am porting 2 devices to Ubuntu Touch and can do everything listed on http://wiki.ubuntu.com/Touch/Porting apart from the following part:
main.mk
The main build file needs to be checked ...
1
vote
2answers
44 views
Bash is printing (only) one of my aliases before every prompt
I think this is the relevant bit of my ~/.bashrc file:
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors ...
1
vote
2answers
56 views
How can you create a command with a Bash file
I created a .sh (or bash) file and I would like to make a command in GNOME-Terminal for the file. I know you run a .sh file by:
./file.sh
After you compile it, I also know all the command are ...
3
votes
1answer
39 views
Can't get $(date +%F) set as environment variable
I would like to create an evironment variable that will output the current date. I have added the following to ~/.pam_environment:
TODAY=$(date +%F)
Apparently you have to log out after changing ...
3
votes
1answer
71 views
Unable to execute shell scripts from `~/bin` [duplicate]
I am learning to write shell script from this tutorial on linuxcommand.org. It says -
Most modern Linux distributions encourage a practice in which each
user has a specific directory for the ...
1
vote
1answer
41 views
Create multiple directory and subdirectory from multiple txt files
I have three text files:
years.txt containing:
2003
2004
2005
2006
...
type.txt containing:
cpu
case
ram
hd
...
month.txt containing:
jenuary
february
march
...
Now, I want to create the ...



