0
votes
1answer
16 views

Hook into “command not found” handler in Ubuntu

I want to hook into the handler for command not found wim@SDFA100461C:~$ thing No command 'thing' found, did you mean: Command 'tping' from package 'lam-runtime' (universe) Command 'thin' from ...
0
votes
0answers
32 views

screen capture full webpage rendered with firefox or chrome

i'm trying to think of a solution that will let me take full page screen shot of a website via a bash script. so far i have tried gnome-web-photo but it doesn't render the webpages correctly. next i ...
-1
votes
0answers
28 views

Why Ii obtain this error when I try to compile and install a software on Ubuntu 14.04?

I am not yet a Linux guy and I am going crazy trying to install a software compiling it on Ubuntu 14.04. This are the only provided instruction to install it: Debian First, make sure that ...
0
votes
0answers
23 views

Start terminator terminal in a free spot on my screen

When I start the default Ubuntu terminal, it automatically puts the new terminal in a spot on the screen where no other terminals are there. Now I set terminator as my default terminal. But whenever ...
1
vote
1answer
37 views

How can I determine via command-line if VBox Guest Additions has been installed?

In particular, I need to know in order to write a bash script to prompt the user to install VBox Guest Additions on a Ubuntu client if it hasn't already been installed.
0
votes
0answers
37 views

Detaching from a GNU Screen suddenly clears the terminal

I feel so stupid for asking this, but here goes: I updated my Ubuntu (Server) install today from 13.10 to 14.04. Before the upgrade detaching from screen did not clear the terminal and now it does. ...
0
votes
1answer
25 views

Removing files and directories that already exist in other directories

I need a help writing a script. So basically I have directories named by current date, like 01-06-2014 02-06-2014 and so on each of these directories has files and subdirectories inside. But sometimes ...
0
votes
1answer
44 views

How can I install my script into the user's $HOME/.bin (or $HOME/bin) directory and make sure that is in their PATH?

Edit: places where I said $HOME/.bin I should have written $HOME/bin or any equivalent is fine. So I have a bash script which I am distributing as a client for my API. Current version installs like ...
1
vote
1answer
67 views

sequential SSH command execution not working in Ubuntu/Bash

My requirement is I will have a set of commands that needs to be executed in a text file. My Shell script has to read each command, execute and store the results in a separate file. Here is the ...
0
votes
1answer
38 views

Error mounting in fstab Ubuntu

'm working on a bash class project which needs me to create 2 partitions in Ubuntu and make them be automatically mounted each time the systems boots with fstab. I got the following file which ...
0
votes
1answer
87 views

How to get xterm-like split windows in Debian (ubuntu)

I'd like to achieve this effect in Linux. Essentially I'd like to have vim open on the left and have a command line on the right to perhaps tail an error log. Ubuntu 14.04 on my desktop, but CentOS ...
0
votes
1answer
33 views

Execute dynamic command into all screen sessions

I am working on setting up a minecraft server network in ubuntu server 14.04 LTS. I have several screen sessions each with their own process running in them There are screens on: 2471.LobbyServer ...
1
vote
3answers
81 views

How can I restore my /bin/bash file?

I am facing a problem with my terminal (Ubuntu 12.04 LTS) . I was making some changes in the /bin/bash , but I have kept a backup of bash.rc in case of something went wrong. Anyway today I have tried ...
2
votes
1answer
23 views

Can you delete all users but specified accounts in Ubuntu?

I am trying to find a way to quickly delete all user accounts except for the ones I specify in Ubuntu. Is there a good way of doing this? Perhaps a bash script that could do this function? I ...
1
vote
1answer
44 views

Find last 24 hours executed commands per each user in bash

How can I find last 24 hours executed commands per each user and mail them the result? I have Ubuntu GNU/Linux. I find out that I need a package named 'acct'. I have already installed and enabled that ...
1
vote
1answer
30 views

Need help in the shell script - gunzip and file command

This is on Ubuntu 12.04. I have a custom webkit based application where "browser" saves bunch of cache files. When triaging the problems, I have to inspect the cache. The cache directory holds many ...
1
vote
1answer
33 views

bash does not work when cd to a particular directory, read and write permissions denied

Trying to run a Perl's script in Linux Ubuntu 11.10, but when Cd to the path, says : no such file or directory, but i can clearly handle the files inside the path. when trying to change the ...
1
vote
4answers
80 views

Find all files where other files with different extension dont already exist

I want to use the find command, to find all files with a certain extension (avi), where the same filename with another extension (mp4) does not already exist. so considering these files: a.avi a.mp4 ...
1
vote
0answers
119 views

IDE for Bash shell scripting on Ubuntu? [closed]

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
2answers
79 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
20 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
39 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
84 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
78 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
32 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
27 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
136 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 ...
3
votes
1answer
87 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
159 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
799 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
86 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
211 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
33 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
47 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
145 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 ...
3
votes
3answers
3k 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
27 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
33 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
480 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
2answers
110 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
157 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
66 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
202 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
67 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
80 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
107 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
686 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
214 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
224 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
87 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 ...