1
vote
0answers
27 views

IDE for Bash shell scripting on Ubuntu?

I'm probably looking for the Holy Grail here, but I figured I'd ask. Is there an IDE for Bash shell scripting on Ubuntu (Ubuntu 12.04 in my case)? Something with a code editor that lets you set ...
-1
votes
0answers
19 views

Move a dir which contains compiled apps

I want to move a dir e.g. file_download to myappDir. I know I can do this via mvcommand. The main problem I have are compiled apps within my dir file_download. And after compile has been finished I ...
-1
votes
2answers
31 views

Unable to boot Windows 8 after an interrupted Ubuntu installation attempt

I have a Sony Vaio notebook with Windows 8(UEFI) installed,after trying to install Ubuntu 12.04 LTS(I cancelled the installation and restarted the pc) from a usb sticky,every time i turn on the ...
1
vote
0answers
13 views

Path slashes disappear on coloured bash prompt

So in my .bashrc, I set my prompt to be colourful by setting PS1 to \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$ For some ...
0
votes
1answer
25 views

Java command only working in command line not in sh files

I have recently attempted to install java on ubuntu server 12.04 LTS. I wgetted the tar.gz file and extracted it to /opt/java and then added /opt/java/bin to the path variable. This all works ...
1
vote
1answer
27 views

Upstart script that displays errors to the console?

I have a simple upstart script that runs a process and respawns it if it crashes. The problem is if it crashes I want the user to be alerted that it crashed (because they may need to take an action to ...
1
vote
1answer
33 views

Bash script that execute command only if port is free

Hi I have a bash script that needs a conditional execution of a few lines of code based on whether port 80 is already in use: sudo git fetch origin; sudo git checkout master; sudo git pull; --- if ...
0
votes
0answers
27 views

Copying .bashrc and .profile does not change anything?

I have a root bash profile setup which has autocomplete and all the nice colours, but there is nothing setup for my actual user (non root). So I decided to copy the files .bashrc and .profile from ...
0
votes
1answer
20 views

Live CD: Script doens't work correctly after login

I have a PXE/NFS Server (192.168.1.10), a client PC and a diskless PC. I installed base ubuntu 12.04 to client PC. I wrote this script (update.sh) to work after login to client PC. ...
0
votes
2answers
78 views

Creating a simple custom apt-get/config script

As I play more and more with Ubuntu, I'm starting to see how I can automate the majority of the repetitive commands that I perform whenever I reinstall the operating system. Thus far, it's just one ...
2
votes
1answer
64 views

Paste a URL in terminal using bash script on Ubuntu

I'm on Ubuntu 12.04. I need to write a Bash script which would automatically paste a URL to the terminal without having to press CtrlShiftV on the keyboard. The script contains the command: wget -O ...
0
votes
1answer
37 views

Solution for automatic VPN-Connection on Ubuntu 13.10

I am searching since ages for a solution to connect to VPN-Servers automatically in my Ubuntu 13.10. It should connect on startup and reconnect on connection-drop. I tried several things: ...
0
votes
3answers
114 views

Why does this script fail when run from cron, but works when run manually?

I have a relatively simple bash script that works great when invoked directly, but fails when run by cron. Why does this fail and how can I make it work via cron? #!/bin/bash apt-get update -y ...
0
votes
1answer
45 views

Fail to redirect log to /var/log/syslog

I have an upstart script that does the following start on runlevel [2345] stop on runlevel [06] respawn pre-start script exec >/dev/kmsg 2>&1 REPO=git@github.com:blabla/bli ...
1
vote
1answer
74 views

Awesome WM: execute my aliases via run prompt?

I have aliases in my bashrc for a few programs. One example is: alias chrome='google-chrome --disk-cache-size=1000000000' How can I call this alias from the run prompt (modkey+r)? Im running ...
0
votes
1answer
23 views

Expand bash variables inputted from the read command

I have a tab delimited file like this: table_a "where id IN ($IDS)" table_b "where fk_id IN ($IDS)" table_c "where fk_id IN ($SOME_OTHER_IDS)" And I'm trying to write a script like: ...
0
votes
0answers
28 views

Ubuntu: `env -i bash --norc`, but include essential variables such as HOME, DISPLAY? (where are these set?)

Is there an easy way to isolate a session of bash so that only essential variables (HOME, USER, DISPLAY, etc.) are preserved? (essential in that many programs fail if HOME, DISPLAY, TERM, SHELL, etc. ...
0
votes
1answer
72 views

Why does this bash script give an error on Ubuntu but not OSX

#!/usr/bin/env sh export $NODE_CONFIG_DIR=/Users/full/path/to/script/config cd /Users/full/path/to/script /usr/local/bin/node main The script runs locally on OSX (if I adjust the paths for the local ...
2
votes
3answers
361 views

command not found when using sudo

There are a few question on the site that seem related to my problem but I could not find a solution in any of them. My operating system is Ubuntu 12.04. I have mvn installed in ...
0
votes
1answer
24 views

Ubuntu How to delete files older than certain file?

There are several files, How to delete files older than certain file X (order by last modified date)?
0
votes
0answers
27 views

Why can a non-root user not access Sublime soft link

I like using Sublime text as a VIM replacement i.e. opening from the terminal with an argument. I installed Sublime into /opt/sublime_text/ and within that is the executable I need. I then soft-linked ...
3
votes
2answers
212 views

Bash script to run “pecl install oci8”

I am trying to create shell script that will do the initial provisioning of a vagrant vm (running Ubuntu 12.04). Everything (installing php, apache, oracle instantclient, etc,) works fine, except for ...
1
vote
1answer
73 views

Change the default shell of gnuplot

My question is: How can I change the default shell of gnuplot? I want to change it in order to send stdout to bash. This should be pretty easy, but I'm giving up. Here's why. I'm running gnuplot ...
0
votes
3answers
102 views

Problems with Bash 4.2.45 on Ubuntu

I am using a remot server running Ubuntu 13.10 with Bash 4.2.45 installed. My home system is OS X Mavericks with Bash 3.2.51 (Darwin build) installed. I haven't used bash much in the past but I've ...
0
votes
1answer
46 views

Log IP address obtained by DHCP Server-Ubuntu Desktop

Would there be a way I could write a script that records the dhcp IP's that the computer running Ubuntu obtains everytime it obtains a new IP?
1
vote
2answers
127 views

bash script tells me when new computer joins LAN via smbclient

I'm thinking of creating a script that loops until it finds a new IP on the Network created by the router DHCP Server. I am thinking of using NMAP. nmap 192.168.0.1-254 However I am wondering how I ...
0
votes
0answers
61 views

Script bash start new process

Every time I run a bash script or a binary, it creates a new process and a messy display, the output text comes only when the process is done. I don't understand why it behaves this way, I would like ...
4
votes
1answer
73 views

Shell history support that doesn't suck?

When I use multiple terminal sessions at once, bash only persists the commands from one of them. Then later when I try to do a reverse command search, the command I want is not going to come up, ...
1
vote
2answers
94 views

How to log output of a part of a shell script

I'm looking for a concise solution for logging the output of a part of a shell script to a file. Additionally, I still want to be able to follow the life output on screen. From the man pages of ...
2
votes
1answer
511 views

unable to send automatic mail via bash script on Ubuntu 12.04: connect to mx3.hotmail.com[65.55.37.72]:25: Connection timed out

First, I apologize for my English (i'm french). I'm using Ubuntu desktop 12.04. I'm still learning Shell Scripts so I may have made a really simple mistake somewhere. I'm trying to write a shell ...
1
vote
2answers
173 views

Restrict user access to only read from /proc

As a method for setting up some bare-bones systems monitoring, I have a script set up to SSH in, and run some basic shell commands, reading some files in /proc. I would like to create a specific user ...
0
votes
4answers
149 views

ubuntu script no such file /etc/init.d/ script

i'm trying to run this script at start up but this is constantly giving me error that /etc/init.d/put_ubuntu_users: 14: /etc/init.d/put_ubuntu_users: cannot open ~/data.txt: No such file This is my ...
1
vote
1answer
71 views

many doubts related to the ldconfig command?

I am pretty new in Linux and I have some doubt related to this operation that I have found into a bash script on which I am working: ldconfig -v >> /dev/null 2>&1 Reading on the man ...
1
vote
2answers
108 views

some doubts about chown command in linux?

I am pretty new in Linux and I have a doubt related to the use of the chown command use. If I have something like this: chown -R root:root /usr/share/MyApplicationDirectory What exactly mean? I ...
1
vote
2answers
87 views

How to use 2x$$ together linux

the questing is how to use two variables togheter.. ex. $1,$2,$3 are set numb=2 I need to use command: head $$numb that must be the same as: head $2 I tried everything, I need to know what ...
0
votes
0answers
49 views

Installing jdk 1.7.0 java -version not working

I have installed java jdk, following the steps as described here but the problem is when i do which jav it gives me the output /usr/bin/java but when i do java -version it says bash: ...
0
votes
3answers
115 views

Shell is interpreting IFS=$'\n' as IFS='n'

I am using a Bash shell on a Ubuntu 12.04 LTS server, and it seems that IFS=$'\n' is being treated as IFS='n'. Script in use: concat=$(echo -n "concat:" && find ...
1
vote
2answers
57 views

How to save linux command?

I am using grep -r [^a-zA-Z0-9]myVariableName[^a-zA-Z0-9] -n JS_files/ as mygrep file grep -r [^a-zA-Z0-9]$1[^a-zA-Z0-9] -n JS_files/ and then sh mygrep myVariableName But then I lose the ...
0
votes
2answers
824 views

Exit sudo in the middle of a shell script

I have a shell script in which most of the commands need to be run under sudo; however, the last few commands need to be run as the current user. Is there a way I can exit sudo and switch to the ...
1
vote
4answers
199 views

Clear terminal output of last command only

Rather than scroll past hundreds of lines of output to see the previous command history, can the output of the last command be cleared? E.g. after executing ls, clear its output because you don't ...
1
vote
2answers
164 views

Linux/SSH - get EC2 instance to read local .bashrc file

I have a custom .bashrc file with color codes locally on my Linux machine running Ubuntu 12.04 for both my user and root. I connect to Amazon EC2 instances daily running the same distro and would ...
1
vote
1answer
216 views

FreeBSD csh style history auto completion in bash

I am looking for a way to make it so that my ubuntu bash shell has the same kind of history completion as you get with csh in FreeBSD. The behavior is that on the command line if i start to type ...
0
votes
1answer
394 views

Check to see if NGINX is installed on UBUNTU

Is there any or command to check whether NGINX is already installed on UBUNTU Linux using a bash command/script? I was trying something like this echo "BEGINNING INSTALLATION OF NGINX WEB SERVER" ...
1
vote
1answer
183 views

Using sed to enable .htaccess files in Apache config

I am trying to automate the provisioning of an Ubuntu Vagrant box with a Bash script. All is well, but I am having difficulty with configuring Apache to allow overrides from .htaccess files. In my ...
0
votes
3answers
118 views

How to locate where is this mentioned in bash

I removed rvm but now every time I do ls I get this message: -bash: /usr/local/rvm/scripts/initialize: No such file or directory It looks like it's still calling it from somewhere but can't seem to ...
2
votes
1answer
245 views

Running commands and shell scripts in Ubuntu

I'm trying to run a shell script in Ubuntu to flash my Firefox OS phone. I've downloaded and unzipped the new version. I've launched the shell and navigated to the directory where the .sh file is. ...
-1
votes
2answers
113 views

what's meaning of the following linux script

sudo apt-get update sudo apt-get install python-software-properties python g++ make sudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install nodejs sudo ...
1
vote
1answer
73 views

How can I enable command line history on a remote Ubuntu terminal session?

When logging into a remote Ubuntu session using ssh, my command line history, which I'd usually access on my local terminal with the cursor keys is replaced with ^]]A ^]]B characters etc. How can I ...
1
vote
0answers
77 views

Bash Terminal keeps clearing / overwriting itself

My bash terminal on Ubuntu 12.04 64 bit keeps clearing itself partially when the output is too big. If I do a ls -al in a directory with many files. The terminal prints the result, inbetween it ...
0
votes
3answers
533 views

How to schedule/unschedule cron job from shell

I have a ubuntu server where I put my application core. It's a jar that needs to be always listening for requests. I made a script to run it with the correct parameters. The scenario is similar to ...