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

learn more… | top users | synonyms (1)

0
votes
0answers
5 views

Can't run rdesktop from desktop launcher

I have a problem with running rdesktop from .desktop launcher #!/bin/bash [Desktop Entry] Type=Application Terminal=true Name=11.11.11.11 Icon=utilities-terminal Exec=rdesktop 11.11.11.11 -u ...
0
votes
0answers
13 views

Ccrontab script returns empty output

I'm writing a simple bash script for analysing disk health status with smartctl and when i run it in a terminal or by script all works fine: for i in {0..5}; do echo "***** /dev/sda$i *****"; ...
0
votes
0answers
7 views

Terminal/Bash permissions regarding installing WS02 and using Oracle JDK

I'm busy installing WS02 on Ubuntu 16.04 LTS Server edition, right now I am facing some problems regarding permissions I guess Below is my terminal log. ws02@ws02:~$ $JAVA_HOME bash: ...
0
votes
2answers
27 views

Problem with sed … too noob to understand how to do what i want to do

I'm updating my .bashrc file to show weather I'm using the line lynx -dump "http://wxdata.weather.com/wxdata/weather/local/14225?cc=*&unit=f&dayf=1" | grep -A 2 -m 1 "<tmp>" Which ...
0
votes
0answers
19 views

How can I measure the performance of different shells?

Is there a good command pipeline to test the shell rather than the program the shell starts if I want to benchmark differences between for example bash and ksh and also test for compatibility between ...
0
votes
1answer
19 views

Variable is taking value as a file instead of text (String)

I'm trying to make a bash script in which I manipulate a download link with user input dates and such to then download the file. When I run it, it throws an error Final.sh: Line 16: ...
0
votes
3answers
42 views

How can I run a shell script from bashrc file?

What I basically want to achieve is to type in a custom command in the terminal and a specific shell script should run each time. I could achieve the above requirement with folders,by modifying the ...
1
vote
0answers
5 views

Using binfmt-misc in conjunction with xattrs

I currently use a piece of sandboxing software on my 14.04 machine that isolates Linux binaries from one another (Using a special type of namespace isolation different than AppArmor) Currently, the ...
0
votes
1answer
16 views

Grub C Code in “set” output?

i made an interesting discovery. When i run set as root the output displays some c code... it seems like some grub boot-loader code.. followed by some unreadable parts. That seems a bit ... wired to ...
3
votes
2answers
28 views

How to read symbol separated strings from a variable, convert to numbers, and perform arithmetic?

In a bash script, I wish to pass in a string which is contained in a variable, and contains up to 3 substrings separated by the '+' symbol. Each substring will have a specific numeric value, sort of ...
1
vote
1answer
25 views

Add a delay to a keyboard shortcut

To put my screens on standby, I've defined a keyboard shortcut: xset dpms force standby This causes the screens to go into standby mode immediately. However, I'd like the computer to wait for 2 ...
2
votes
1answer
34 views

Bash prepends the symbol '@' to $PS1. How do I get rid of it?

I'm running Ubuntu 16.04 and bash keeps putting '@' in front of my prompt, regardless of the value set in ~/.bashrc. I've tried setting different values both in the ~/.bashrc file and from within the ...
2
votes
2answers
19 views

mv a folder and now the folder seems gone

I typed the following: mv /var/www/folder/ ../../ Now I can't find that folder or anything that was inside of it. What am I missing? /var looks like this: root@,my-server:/var# ls -la total 52 ...
1
vote
1answer
23 views

How to check computer's timezone through Terminal? [duplicate]

I am writing a bash script which at some point needs to determine a user's timezone, so how exactly can I check the timezone in Terminal? I would like to be able to get output in terms of GMT and UTC. ...
2
votes
3answers
278 views

Cyclic script execution

How to make the cyclic execution of the script? At the end of the script i need to run it again. Cron is not suitable, because i need to run the script immediately after the previous
0
votes
1answer
31 views

-gt: unary operator expected shell script

Getting this error after the upgrade packages in ubuntu. #!/bin/bash used=$(df -H | grep 'rootfs' | cut -d "G" -f 4 | cut -d "%" -f 1) limit=90 if [ $used -gt $limit ]; then Or [ "$used" -gt ...
1
vote
0answers
25 views

Hot Corners Musical Sequence Command Script

I am writing a script which uses hot corners to play specific musical notes when hovering in corners, and depending on the musical sequence to execute a specific command. The script is called with ...
1
vote
1answer
19 views

How to set up bash autocompletion to deal with file names like “./foo=bar/x=y.txt”?

When I start typing a file name that contains an equal sign, autocompletion with [tab] shows a strange behaviour: ls ./foo[tab] # autocompletion to "./foo\=bar" <- ok ls ./foo=[tab] # ...
0
votes
1answer
21 views

Is there any advantage to Rsync moving files on the same machine?

I was reading how to install Magento on Digital Ocean Ubuntu 14.04 VPS. All files are on the server. the author says: We will use rsync to transfer our Magento files there, since rsync will ...
0
votes
1answer
22 views

Bash script syntax

I want to create a .sh script which will execute a python file called match_scraper.py, update a psql db as shown, call a scrapy spider to execute. When I create the .sh script how do I call ...
2
votes
1answer
35 views

Shell script password with special chars

I've build a shell mysql backup script which works very well. It only has problems with passwords with special chars like this: xgT{uic[Is?uJ+. Here is the important part of the script: #!/bin/sh ...
0
votes
1answer
21 views

repair ~./profile file

I just messed up with ~/.profile, tried to add something to PATH, but looks like there was a syntax error in my code and now the login screen functionality won't work and I can use ctrl+shift+f1 tty ...
1
vote
1answer
29 views

What is POSIX-compatible mode in Linux?

The book says : When in POSIX-compatible mode, bash will emulate sh. What does this mean? What is meant by emulation in simple layman terms?
1
vote
1answer
39 views

Bash script cannot run with keyboard shortcut

I have this script in my /home/username/ And I can run it via terminal with the following code ./script.sh or sh script.sh it works (it has executable permissions) but I cannot assign it to a ...
0
votes
2answers
17 views

run two ongoing processes on startup with one that needs initialization time

I'd like to record start recording utility consumption right at startup but I can't find the right combo of operators, pipes, and sleep commands to enter into crontab -e . I think my smartest attempt ...
0
votes
1answer
66 views

I can't switch “switch to Downloads directory” using bash (I'm new to this)

I'm new to programming and trying to download Swift on Ubuntu on Windows 10 Insider Preview. I'm now running bash on Ubuntu, I'm trying to get to the Downloads directory. I tried cd ~/Downloads and I ...
-1
votes
1answer
22 views

start screen programm with crontab @reboot

I try to start a start.sh at reboot with crontab. But nothing happens afer a reboot, and the log is without an error. Does someone know what i've done wrong? For testing i gave the start.sh and ...
0
votes
2answers
32 views

Can we install a package through a shell script?

I'm trying to write a shell script so that when I reinstall my Ubuntu again. I could just run script and retain all the packages. And I'm planning to pass password in form of argument. My question ...
0
votes
1answer
40 views

What command is the most effective for listing processes? [closed]

I've seen lots of developers use ps -ef to list processes and kill them (such as in ENCOM, devs of OS-12). However, there is also htop. A friend told me that it is only a wrapper around ps and ...
-5
votes
0answers
37 views

can someone explain this bin.sh shell script for me? [closed]

Can someone please explain this shell script that was detected from my honeypot? #!/bin/bash busybox rm -rf /tmp/* busybox rm -rf /usr/bin/strings busybox rm -rf /usr/bin/ps busybox wget ...
0
votes
0answers
25 views

Link broken but when “ls” is used on link in terminal the content is displayed

I noticed an interesting fact today. I have a link on my Desktop pointing to windows partition (dual boot Ubuntu 14.04 & Win8.1). Because this partition is not automatically mounted the link is ...
1
vote
1answer
29 views

rsync can't exclude directories

I run this cmd to backup my folders: $ rsync -av --exclude {/mnt/dati/Film/, /mnt/dati/Scout/} --delete /mnt/dati/ /media/cirelli/HD1TB/backup/dati sending incremental file list And rsync answer ...
3
votes
2answers
309 views

Command line IF not working as expected

I'm relatively new to the terminal programming. I'm trying to run an IF condition within a FOR loop. (The command is to be run by a cronjob) for i in {1..5}; do echo $i; if [ $i>3 ]; then echo $i; ...
0
votes
0answers
60 views
+100

Apache startup script keeps lock file open

I am writing a bash script for a backup task. Among other things (file system freeze, database lock, snapshots,...) it involves shutting down Apache and restarting it after the Backup. Since that ...
0
votes
2answers
33 views

Custom commands with options [closed]

How to create custom shell script/command with flags/options ? $ command -t 2 -h "File"
0
votes
0answers
22 views

Bash script issues [closed]

In Bash shell, when the database name is changed the resulting trace file and other related locations would change but the alias for tracefile location does not change upon change of database name... ...
3
votes
3answers
202 views

How to rename all files in folders with pattern

I have a bunch of files like: bla.super.lol.S01E03.omg.bbq.mp4 bla.super.lol.S01E04.omg.bbq.mp4 bla.super.lol.s03e12.omg.bbq.mp4 I need to rename them all like: s01e03.mp4 s01e04.mp4 s03e12.mp4 ...
0
votes
1answer
24 views

Syntax error near unexpected token `newline' while installing Predictionio

I'm new to Prediction.io and when I try to install it following the instruction at this page I get the following error: bash: -c: line 0: syntax error near unexpected token `newline' bash: -c: line ...
1
vote
1answer
27 views

Gnu date input formats

I am trying to get my head around the date input formats used in date -d "something" Specifically I am trying to understand the use of the "Day of week items". The manual page for date refers you ...
1
vote
1answer
22 views

Aliasing gedit to suppress terminal output

I am SSH'd into an embedded board (Jetson TK1 running Ubuntu 14.04). I use the -X option so I can use gedit to edit text files. When executed from a terminal, gedit spews a bunch of garbage on the ...
1
vote
1answer
148 views

Note Taking Using Command Line History

Is executing a line, beginning with a hash-tag, like #something, in a terminal, dangerous? Something like: usr@machine:~$ #something Or in a multi-line manner: usr@machine:~$ <<something ...
2
votes
1answer
48 views

How to use sed with file path variables AND regex callbacks AND arithmetic expressions

I'm having a hell of a time getting the proper syntax using sed with variables containing a file path, a regex callback and an arithmatic expression. I don't know how to properly escape things. I ...
0
votes
1answer
26 views

what does -alt |more command do in ubuntu

can some one explain what does -alt | more command do in UNIX with what is the function of alt,-, | and more.
1
vote
0answers
39 views

Non-printing characters showing up in terminal prompt

Without color my prompt looks like this: [0] [dimo414@dimo414:/tmp] $ echo $PS1 | sed 's/\x1b/\\e/g' \n[0] [dimo414@dimo414:/tmp]\n\$ I add some color and \[...\] delimit it: [0] ...
0
votes
2answers
45 views

How to write a recuring bash script

I created a program that requires a sequence of command line instructions to scrape new information and update the databases. Is there a way to automate this process so I don't have to type all this ...
1
vote
2answers
39 views

Execute a command stored into a $variable

I made a script where I wrote: COMMAND="/usr/bin/exiftool $PATH_NAME" .... code .... $COMMAND The variable $PATH_NAME is assigned dynamically inside a while loop. The command works fine until it ...
0
votes
0answers
21 views

Need help with Bucket Brigade Script [closed]

I want to write two scripts, brig and passer. The brig fire n command starts a fire with a n size. The brig status command displays the status of the fire. The brig quit command just exits the fire ...
0
votes
2answers
34 views

“mv” apparently deleted my script!

My command was: mv count_entries.py ~/journal_tools/ Now the file is missing from both ~ and /journal_tools/... If it matters, I was logged in as a user without administrative rights, and ~ is a ...
0
votes
1answer
35 views

Openvpn - Terminal blocked after starting connection

i have a little Problem with openvpn. I want to establish a VPN connect with open vpn, then get a file from an FTP Server and than close the connection. The VPN and the FTP are working fine. But if ...
1
vote
2answers
38 views

Bash script help, check permission 755 on all files in a folder

I'm attempting to create a bash script where I check if all the files of a specific folder (/tmp) have the permission 755. I also need it to delete all the files that don't have permission value 755. ...