0
votes
1answer
28 views

Confusing Code, request help [closed]

I need help. I am recently coding a bash script, which I have 26 sets of variables. I'm stuck on this part which I need help with. I noticed when you install Ubuntu to check out this website if you ...
0
votes
1answer
51 views

Controlling a loop and saving the output for each event

How can I control a loop and read live feed from a usb port and save each of the output when the usb is inserted or removed. I know the code below can be improved, please assist. #!/bin/bash ...
11
votes
1answer
564 views

Bash comparison and expression operators

I'm new to bash programming. I've read two good, long guides, but they made a mess in my head about operators and keywords. Which are more commonly and widely used? I don't know when to use which ...
4
votes
1answer
5k views

Run program from a shell script but behave as one process only?

Is there a way I can execute an application from a shell script but not create another process. I want it to look like one process only. It doesn't matter whether my shell script is replaced by a new ...
2
votes
1answer
226 views

How can I test if a variable matches another value and move to another function?

I am writing a script where I store a predetermined line of text into a string (we will call abc). I am storing the results from grep -iqs $USER file (we will call def) into another string. How can ...
6
votes
5answers
828 views

How are the programs in /bin directory compiled into a non-readable format?

I've noticed that most of my commands/programs in the /bin directory are compiled. I wish to duplicate this non-readable code format myself. Can someone tell me why and/or how these programs get this ...
2
votes
3answers
2k views

Loop in bash to create decimal number

How to generate a numbers 0.01, 0.02, 0.03 ... until 0.2 in bash ? i run this example but it doesn't work #!/bin/bash # # Script for running several experimentations one the same JVM # for ((i ...
3
votes
2answers
3k views

Python Compared to BASH

I've been studying bash for the past three weeks or so, and it is very easy to learn since it is basically just command line inputs. I've decided to now move onto python but I've been lost the whole ...
3
votes
3answers
8k views

Fast way to create gui for bash app

I want to build a simple GUI for an app that use bash so for example clicking on a button would execute some bash commands and so one. There's a GUI creator also simple, i need only buttons and ...
5
votes
2answers
573 views

How to re-start a python script without killing other python processes

I develop an app called Unity Mail. A quicklist option «Edit accounts data» needs to restart it. File /usr/bin/unity-mail: #!/bin/sh python /usr/share/unity-mail/unity-mail.py $@ File ...
4
votes
2answers
1k views

Print terminal output in gedit automatically?

the command time ./myprog displays the time it took to run myprog on the screen. Now i would like to write this information to a text file. How?