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

learn more… | top users | synonyms (1)

0
votes
0answers
64 views

can't run Cyberoam Client on x64

I got following error when trying to run this file: bash: ./crclient: No such file or directory when u download the client u get this 2 files : ( crclient ,README) ...
0
votes
0answers
13 views

Multiple scp commands in bash script, but entering password only once [duplicate]

I currently use a bash script in the following format to update local data with remote one: usr=$1 scp -P 4444 -r $usr@some.other.machine.at:/some/folder/*Tools /home/localUser/someFolder/ scp -P ...
0
votes
1answer
36 views

Using read to simply short bash command

I am trying to simplify a small command I use for some video streams I use. I can successfully call the streamed video with the following: livestreamer -p mpv --crunchyroll-username="USERNAME_HERE" ...
0
votes
1answer
34 views

how to take input from php and execute it in a command-line program in terminal linux

i cant take an input enter by a user to load the input in a Linux terminal to execute it in a command line program...can you help please...for example when a user enter a value and press enter in must ...
0
votes
1answer
37 views

Difference in formatting between a bash command execution and a script

I don't understand why there is a difference in how the output is formatted on standard output for identical commands run from within a script and directly from the bash. When I run ls -l from my ...
0
votes
1answer
46 views

Script to check system is locked or not at certain time

I want to write a script to check whether system is locked or not at certain time. So can anyone tell me what would be the condition to verify that system is locked or not ? Thanks in advance!!
4
votes
1answer
49 views

How can I make my prompt show the current directory and the previous directory

I edited the .bashrc file if [ "$color_prompt" = yes ]; then PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u\[\033[00m\]:\[\033[01;36m\]\W:\[\033[01;34m\]\W \[\033[00m\]\$ ' else ...
0
votes
3answers
77 views

Is it important to install disk monitor on linux? [closed]

As a linux system security administrator & server manager?
0
votes
0answers
28 views

force script to run in terminal emulator, with all arguments preserved

I have this bash function: runinteractive(){ if [ "$(tty)" == "not a tty" ] then x-terminal-emulator --working-directory $PWD -e "$0 $*" exit fi } For some reason the $* ...
1
vote
0answers
31 views

Cheese wont die

Im trying to figure out a problem Im having with a motion server, and a given CCD camera, on /dev/video0 So, I had been viewing the camera stream using cheese. But now cheese has hung up, and wont ...
3
votes
5answers
78 views

How to remove lines which contain asterisk by using sed command

I have a file which contain following lines. **;**;**; *(Eng_Sen:This is an apple)*;*(WordID:1 2 3 4)*;*(message:)*; **;**;** I want to delete all the lines which contain following patterns using ...
0
votes
1answer
50 views

bash: ./configure: No such file or directory

I'm trying to install a GUI for Dansguardian (https://bitbucket.org/ssoulaimane/webcontentcontrol-gambas3) but when I type: ./configure && make && sudo make install I get an error ...
0
votes
0answers
21 views

Screen application shortcut closes terminal

Hi whenever i tried to connect usb port with screen application. screen /dev/ttyUSB0 115200 works well. But whenever tried to do it in a shortcut, terminal closes but screen works on background. ...
0
votes
3answers
126 views

How to get the location of a program in Ubuntu terminal?

How to get the location of a program in Ubuntu? For example I have Oracle, how to get the folder racine (location) of Oracle?
9
votes
2answers
822 views

Difference between $'$foo' and $“$foo”

I am having difficulties figuring out some the nuances between single and double quotes within a variable context I define: foo=pwd then run these: echo $'$foo' Which echos $foo (meaning the ...
2
votes
1answer
86 views

How use cd command to access a directory with space [duplicate]

How do I use "cd" to access a directory with a space, for example "XML 5.1 Final Fields" in a bash script I tried cd XML 5.1 Final Fields But it's giving the No such file or directory error. This ...
1
vote
2answers
138 views

14.04 inside docker “TERM environment variable not set”

I am running an ubuntu 14.04 inside a docker container. My image is build from the official ubuntu:14.04 image) The Docker file is almost identical with this ...
1
vote
1answer
22 views

Listing Duplicate Words

I have a file which looks like: (aa,((bb,cc),dd)); (((aa,cc),ee),(ff,gg)); ((aa,ff),hh); Each line actually represents a phylogenetic tree in newick format. I would like to list all the names that ...
0
votes
1answer
82 views

bash script to check website content by curl command

I want to write a script to check out if the website is working fine by checking out some of it is contents. If the content exists in the result, it prints a message telling the website is working ...
0
votes
1answer
27 views

extract line from file

a file I need to extract info from looks like 2 41620 . T G 100 PASS ...
0
votes
1answer
33 views

Set expire date for users

I use ubuntu 12.04, i have a file "user.cfg" and i put in this file the users like this F: user pass { enddate=2017-01-24 } This file existe in /var/etc/ Here's image of the file I want a script ...
3
votes
1answer
53 views

Execute command for a specific output of a command

I am interested in executing a certain command every time any program I run outputs "segmentation fault". Basically I have a bash script that writes the timestamp in a log file and do some other stuff ...
1
vote
3answers
72 views

Bash command substitution syntax (for script to determine my global ip)

I'm new to scripting and I'm stuck. I need to convert this: MYIP=`ifconfig eth0 | grep 'inet addr'| awk '{print $2}' | cut -d ':' -f 2`; Into this: MYIP=curl -s checkip.dyndns.org | sed -e ...
1
vote
1answer
115 views

Execute commands on a remote servers by 2 scripts

Currently I am using SSHPass in a script to connect to a remote server: sshpass -p PASSWORD ssh -o StrictHostKeyChecking=no USERNAME@1.1.1.1 and to execute any command remotely, I use: sshpass -p ...
0
votes
1answer
27 views

WICD silent installation

I would like to install WICD without touching any key. I have it downloaded with all of dependencies in wicd directory This is how line in BASH looks so far: dpkg -R --install /usr/debs/wicd/ ...
0
votes
1answer
51 views

Need help building shell script for copying

I have thousands of pictures (raw) in my computer sorted out into many folders and subfolders. I want to copy those into cloud drive. I successfully mounted to cloud drive. Due to my limited upload ...
0
votes
1answer
75 views

(Ubuntu 15.10 64 Bit) Similar errors when running wine/steam/aapt - newline unexpected, expecting “)”

I'm getting some similar errors while running aapt from Android-Studio, Running wine via playonlinux (haven't tried normal wine yet) or when trying to install steam. Perhaps with other programs as ...
3
votes
3answers
459 views

Bash script not recording

So, here i am, playing with some bash scripts, and there is something that doesn't work: #!/bin/bash script -c \ sudo apt-get update && sudo apt-get upgrade && exit echo "(Not ...
3
votes
1answer
62 views

script to concatenate multiple text files found in zip archives nested in multiple folders

I have 30 gig of text files and html files from various sources laying in a nested folder hierarchy. All these folders are in my home directory in a folder named zipFiles. The hierarchy is 20 levels ...
0
votes
0answers
22 views

Files selected using zenity --file-select are not added to “recents” shortcut

I'm using zenity to select input files for a lua script on the command-line. While using the GUI already saves time over the alternative of typing in really long filenames, I was hoping to save even ...
4
votes
2answers
134 views

How to close terminal from a bash script

I'm new on this forum and with Linux. I'm trying to make a simple script what will open a new terminal with a new name, and close the old terminal from where the script was running. The problem i ...
1
vote
1answer
63 views

sh script works manually but not via cron

I have a cronjob created using this tutorial: http://www.matt-helps.com/automatic-backup-of-mysql-database-to-s3/ It works when i run this command sudo sh s3BucketBackupScript.sh But I can't get it ...
0
votes
0answers
23 views

Drop cache pages and memory (cleaning the cache) as normal user

Some times I need to clean the system cache by doing the steps below: sync su echo 3 > /proc/sys/vm/drop_caches as you can see, I need root privileges for this purpose. Is there any way to do ...
0
votes
0answers
37 views

Bash - for loop help needed please

So I have the below script and it works as expected (it SSH's to 40 hosts, goes to a specific file looks for a specific word with a date of yesterday, puts a . at the end of the line and then mails ...
0
votes
0answers
28 views

How do I use the mmv utility to move an arbitrary number of files?

I have a folder with too many files, I want to move some of the files to a subdirectory -- without a script. How can I move, or copy, not all files, but the only the first n number of files? For ...
3
votes
2answers
405 views

gnome-terminal starts with “grep: write error: Broken pipe” message

I am running Ubuntu 14.04.3, it's uptodate. I don't know why, for a few days I began to take grep: write error: Broken pipe message on launching gnome-terminal . It seems to be harmless but it bothers ...
3
votes
1answer
136 views

How to autorun a ruby script in Ubuntu?

How hard can it possibly be to run a ruby script on startup?! Fairly tough apparently: I'm using rvm and running ruby 2.3.0. which ruby returns /home/ubuntu/.rvm/rubies/ruby-2.3.0/bin/ruby The ...
3
votes
1answer
132 views

./run.sh: line 1: java: command not found

I'm trying to install worksnaps client so I can start working on a project. I'm running Ubuntu 14.04 LTS 32bit system. Installation and Configuration for worksnaps are simple : Download the ...
0
votes
1answer
27 views

Bash prompt after format of drives

I'm almost certain I formatted all my partitions to unallocated space, yet on an occasional reboot back to windows 10, I get thrown to a bash prompt. So I have to reboot and select windows boot ...
0
votes
0answers
95 views

Color coding the terminal with ANSI R,G,B

My question is where would be an appropriate place to share the below script? r=0 g=0 b=0 while : ; do for ((r=0;r<6;r++)); do color=$((16+36*r+6*g+b)); printf "\033[38;5; ...
0
votes
1answer
65 views

Why is rsync copying directory structure when my find result only shows me files?

I have an annoyingly complicated find command I've cobbled together that I pipe to rsync with the intention of copying files and syncing new versions. I'm trying to write something that is efficient ...
0
votes
2answers
67 views

How do I access my Bash History? [duplicate]

I am fairly new to Linux and I need to find a way to show the contents of my Bash History via the command line, and unfortunately I can't seem to find anything that works, or that I can understand. I ...
3
votes
2answers
116 views

Can VeraCrypt use persistent mount points on Linux?

Can VeraCrypt use persistent mount points on Linux? Windows + VeraCrypt + encrypted volume absolute paths On Windows I can mount veracrypt encrypted partitions/disks via batch script which employs ...
0
votes
1answer
32 views

Unable to start a cron task as root

I use a program to check raid status. The command is megaclisas-status. Here is the issue : Has user /usr/sbin/megaclisas-status return : This script requires Administrator privs => OK Has root ...
0
votes
1answer
47 views

How to change command line prompt name and add path of current directory after name? [duplicate]

Currently my command line prompt looks like this nuve@nuve-Inspiron-5547:~$ but I want to change it Azer's Terminal:"Path of current directory". How can I do this? I need exact code line to add to ...
-1
votes
1answer
60 views

What's wrong with tee command?

I am running the following python script piped to tee command #!/usr/bin/python from sys import exit,exc_info from time import sleep try: print "hello" #raise KeyboardInterrupt ...
0
votes
1answer
40 views

Can't execute this file [closed]

I can't execute the skype file. I have the permissions I need. What's the meaning of filename* in the ll output?
0
votes
1answer
71 views

How to make shell script restart Java if any thread crashes? [closed]

I have a multi threaded Java program. Ideally it should run once and successfully terminate. Unfortunately, sometimes one of the threads crashes, such as by throwing DivisionByZeroException. Since ...
2
votes
2answers
160 views

Why do scripts ran via “sh *.sh” function differently than “./*.sh”? [duplicate]

I'm using Ubuntu 15.10. I have noticed a weird problem. When running a rsync command embedded in a shell script (as root) with --exclude={} options, rsync works and excludes paths as it's supposed ...
-1
votes
3answers
56 views

Extract info from file

Is there an efficient way to parse a file like: 2 41620 . T G 100 PASS ...