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

learn more… | top users | synonyms (1)

0
votes
1answer
17 views

compare strings in two files and update the status

i have following data set in text file data.txt: d1,40,gold d2,30,silver d3,20,bronze d4,10,iron d5,5,wood d6,20,gold d7,10,wood d8,5,god d9,10,silver . . . ...
1
vote
1answer
23 views

bash comparing multiple column in two files with different length

I have following data set in text file data.txt d1,40,gold d2,30,silver d3,20,bronze d4,10,iron d5,5,wood d6,20,gold d7,10,wood d8,5,god d9,10,silver . . . def.txt ...
0
votes
0answers
12 views

Why does this fail to make my postfix configuration step non-interactive?

I have a bash script to automate configuration of new Ubuntu systems. It works, except that postfix's process installation persists in bringing up a menu-based interface. I followed the answer given ...
0
votes
0answers
15 views

How to start CAESES free?

I have downloaded the program CAESES free on my Ubuntu 14.04.1 LTS and unpacked it into the folder /home/xyz/Programy/CAESES-FFW_3.1.2_Linux.x86_64. The program developer proposes to use the bash for ...
1
vote
2answers
32 views

How to find (and delete) duplicate files among local disks and NAS? [duplicate]

I want to detect and delete duplicate files (same size) along local Disks and Nas Disks (The Nas Disks are mounted using Samba) I found the How to find and delete duplicate diles answer but I'm ...
0
votes
0answers
11 views

Bash Tab Autocomplete Not Listing Matches

I've found questions detailing this problem or a similar problem but none of their solutions have worked for me. On another box (RHEL some version) I've the ability to tab-complete with a wildcard ...
1
vote
0answers
20 views

Can simple scripts use GUI file manager to select file?

I have an extremely simple script that currently executes a command on a file located in the same folder: command ./file_in_folder option output. It would be better if script asks user which file they ...
0
votes
1answer
28 views

Network scanning script - cronification issues

This is (yet) another query about cron. I have referred to the guide on this site before posting here, but I still can't get this script to work. It is designed to suspend the PC when activity on ...
0
votes
1answer
13 views

How to allow the shutdown of computer using web server?

I have a web server under apache2 and php5. I want to shutdown a computer using web server but to shutdown the computer a current user should be 'root' user because command for the turning off of PC ...
1
vote
2answers
33 views

bash text colon values to html table

i had a big file with more than 10000 recordslike below, this need to be converted to html table i tried various ways with converting into csv and then to html etc.., not able to get the desired ...
0
votes
1answer
26 views

Help with an IF and SED to replace \n

I have a filename variable that sometimes gets set as: attachment; JobRunStatisticsReport_20150122.zip In the File Manager window, it looks like this: I need help coming up with an IF statement ...
1
vote
1answer
18 views

Login screen keeps coming back (bash_completion related)

I'm using Ubuntu 12.04. By accident I deleted /etc/profile.d/bash_completion.sh. I then restored it by copying that same file from another similar Linux machine (same OS). Now I can't login because ...
1
vote
2answers
429 views

Difference between `sudo su` and `sudo fish` [duplicate]

I am running fish (Friendly Interactive Shell) as my standard shell in Ubuntu 14.04, rather than bash. I noticed the following behaviour and don't know, if any of these are the preferred one to gain ...
0
votes
2answers
38 views

How do I use the set command to find directories in my path?

I am taking a linux class this semester and one of the questions on a lab is: Use the set command to find out all directories in your path. Normally, I would just use $PATH to find out the ...
0
votes
1answer
13 views

How to check for any activity on a physical disk?

I have an SD card that's connected via a USB interface. The output of fdisk -l indicates the following: Disk /dev/sdb: 3965 MB, 3965190144 bytes I have a script that re-initializes multiple ...
0
votes
0answers
28 views

Bash script environment can't get exported variable from user

I have a user daniel, from which I'd like to retrieve an exported value as root. So I did some research and came up with this command: $ su - daniel -c '. ~/export_script; echo $EXPORT_PATH' > ...
0
votes
1answer
30 views

Help me remove this Bash error

The bash error below keeps popping up each time I open a new terminal, why is that? How do I fix the bash error below? bash: /home/yonas/.rvm/scripts/rvm: No such file or directory
0
votes
1answer
56 views

Code works in Terminal, but not when in a script

I have: This is my zip file.zip in path $dec If I manually copy this code over to the terminal window, I get the correct output. But, if I take the same exact code and put it into a .sh file and ...
1
vote
1answer
26 views

Differences between md5pass and md5sum

This question may be insane ,but due to definition of hash algorithms, hash algorithms are some kind of functions that accept variable length input and make it encrypted and the output always has a ...
-1
votes
1answer
25 views

“Command not found” after running a file compiled on the same directory

I don't know what is going on... d@d-SVF15A17CDB:~/University/CSC209/a1$ gcc -o remvocals remvocals.c d@d-SVF15A17CDB:~/University/CSC209/a1$ dir remvocals remvocals.c ...
0
votes
0answers
48 views

IF statement not traversed correctly in script responsible for unpacking zip files

I've been working on an IF statement for a couple days now and have been unsuccessful at getting it to run correctly. All of the embedded code seems to work when I manually paste it in Terminal, but ...
0
votes
1answer
15 views

Implementing an if clause in simple bash script

I've got a bash script that makes use of cal -m $v where v is number . The user is prompted for v's value at the beginning of the execution . In case the user presses ENTER instead of introducing a ...
-2
votes
1answer
32 views

How to combine ls and grep to list only files and using ls to count dirs

I have some troubles with combining ls and grep. The thing is that I have to use only ls and grep to list all files in home directory. Ive tried multiple of combinatnions but with no effect. I think i ...
0
votes
1answer
21 views

Syntax for regex in IF statment

I'm trying to come up with the syntax for a regex in an IF statement, but I'm not quickly having success... Can anyone lend a quick hand please? if [[ "$path/$file" =~ .{txt,doc,docx,xlsx,rtf} ]]; ...
-1
votes
0answers
71 views

The program 'sed' is currently not installed. You can install it by typing [sed: not found]

I was trying to create my own program in the /usr/local/bin. During the process I messed something up and now anytime I press enter or type anything in the command line, I get this stupid ...
-1
votes
0answers
27 views

Opening a scoket in Kali linux using bash scripts trouble [closed]

I know who to open a TCP or UDP socket in Ubuntu, by the following command : exec 3<>/dev/tcp/google.com/80 (for example) we can open a TCP socket on port of 80, but in Kali Linux there's no ...
0
votes
1answer
20 views

A problem when invoking a function in a bash script

I've written the following bash script to find a driver's name, I'd make it better but for now I just want to know why this script doesn't work ? #! /bin/bash ## the driver's name ...
0
votes
2answers
27 views

How do you create a shell script?

I need to create a shell script that will create a user then put it into a group. How do I do it?
0
votes
1answer
16 views

A bash scripting problem

In advance , I'd say I know the basic syntax of bash scripts but the following statement is not recognized for me : if [ ! -f /etc/debian_version ] could you help me what this condition going to ...
0
votes
0answers
26 views

how do i achieve executing a python script ON TERMINAL via a shell script in nautilus folder by the right-click>Script way?

Using nautilus i am writing a script which will run the python script which invoked it. So to run a python script i just need to right-click on it>goto scripts>select appropriate script and it will ...
1
vote
0answers
27 views

Desktop Environments Incorrect After SLiM Install

I am working on making an automated install based off of Lubuntu using Debian Installer so that the install is as automated as possible (a few inputs at the very beginning). So far I am mostly pleased ...
1
vote
1answer
23 views

PATH is not getting exported by default in Ubuntu 12.04

When i run su on command line and enter root password, I am getting error as mentioned below: Command 'lesspipe' is available in the following places /bin/lesspipe /usr/bin/lesspipe ...
0
votes
2answers
56 views

A strange problem about terminal or command environment

Two weeks ago I was learning Python and Flask. I followed step-by-step the steps in The Flask Mega-Tutorial, Part I: Hello, World!. While I was following the tutorial, I had problem in "virtualenv", ...
1
vote
1answer
26 views

How to temporarily disable sleep and hibernate from the command line

It seems like there are many ways in which a Ubuntu's settings can be permanently manipulated to sleep when desired as long as predetermined conditions are met. However, these are more permanent ...
0
votes
1answer
41 views

Why isn't Roundcube's Upgrade Shell Script Working?

I am trying to upgrade my Roundcube installation from version 1.0.4 to 1.0.5 and I cannot get the upgrade script working properly. According to Roundcube's upgrade documentation, the following command ...
0
votes
2answers
27 views

bash script dollar sign operator $ question - is it incompatible to ~ operand?

I am new to the Linux environment. After a quick search I could not find a helpful question about the $ operator used in bash scripting. I do not know if this question relates more to the Ubuntu (or ...
0
votes
0answers
30 views

Bash puts ':' after each command

I updated my bash_aliases from another system I own, and now, I have found the following problem: If I use a command, bash put : after each command and alias. Why? What can cause this problem? In ...
0
votes
0answers
20 views

Pulseaudio increase volume above 100% per channel

I'm using a bash script to start kodi (aka xbmc) in Ubuntu. The script adjusts the volume per channel for my 5.1 sound system: amixer -D pulse sset Master 90% amixer -D pulse sset 'Master' ...
0
votes
0answers
13 views

What's mean of command? [closed]

I have .bat file to start game server, in the code of them has a command but i dont know is this DOS's command or java or shell command ?. On startgame.bat echo ------------------------- java ...
-1
votes
0answers
20 views

What you want to see in daily server monitoring mail?

I write bash script, which collect information from ubuntu server and send it by mail. With this script you can see: Your clamav antivirus information Which ports are open How many users in your ...
-1
votes
0answers
20 views

translate windows bash script to sh on ubuntu [closed]

i've a .bat scripts running on windows but i want tranlaste it to shell to run it on Ubuntu server. however must keep it in background processing before server shutdown. Anyone known please translate ...
-1
votes
1answer
63 views

Deleting input forward to the next space

This is my question: When in terminal I can use Ctrl+w to delete a whole word or IP (. is separator for each octet) when going leftward of prompt. However, if I try Alt+d to go rightward of prompt, ...
0
votes
0answers
26 views

Using bash script output with periodic output selectively to trigger a json

i have a python script that probes a motion sensor every few seconds and returns a value on the shell "sensor is off" or "sensor is on" i next created a bash script as follows called sensor.sh ...
1
vote
3answers
43 views

One liner ffmpeg (or other) to get only resolution?

I'm not really well versed in the command line so hopefully this isn't too stupid of a question. If I run: ffmpeg -i videofile.avi I get an output such as this: ffmpeg version ...
0
votes
1answer
16 views

SFTP change notifications

I am looking for any solution for my problem. I have SFTP access to client's server and I need some script or something else to watch after new files because they are added irregularly. I need this ...
0
votes
1answer
35 views

Can't call wget from Python script [closed]

I am writing this script that executes a bunch of commands one of which is to download some packages from a certain url. Following is my script #! /usr/bin/env python #! /usr/bin/env bash import os ...
1
vote
1answer
42 views

Editing my Bash prompt

I'd like to put something into my bash prompt, but I'm not quite sure how to do it. I use the Cloud Foundry Command Line Tool to push code up to my servers. The cf tool can be set to a specific ORG ...
0
votes
0answers
24 views

the command argument is not passed to /bin/sh in popen

Here is a scenario where I use popen as FILE* stream = popen("Root", "r"); As per my understanding the Root argument will be passed to /bin/sh and interpretation is done. In my case, Root should be ...
2
votes
1answer
36 views

How to compare two (vague) file lists and print the duplicates?

I have two file lists. backup.txt and backup2.txt Some of the entries aren't exact, so it makes it difficult to find the duplicates with diff or uniq. Example: :::backup.txt::: auser_backup ...
0
votes
1answer
19 views

Match Pattern and write following value as variable

I'm trying to match a pattern and then pull the following information to create a file using that variable. Example (my data may look like either of the 2 examples) "headers": { ...