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

learn more… | top users | synonyms (1)

-1
votes
1answer
28 views

bash: ./configure: No such file or directory [on hold]

I am real noob in ubuntu. I am currently working for my university project where I am supposed to install "ns miracle". It has a prerequisite, "ns allinone 2.xx", which I installed successfully. But ...
3
votes
2answers
63 views

For loop syntax bash script

Is there a way we can implement some thing like this in bash script ? pureips="10.3.1.111 10.3.1.112 10.3.1.114"; pureservers="a b c"; for ip,server in $pureips,$pureservers; do echo "$server | ...
2
votes
1answer
30 views

How to make the terminal autocomplete based on previously entered commands?

It's normal when using terminals that pressing up and down cycles through previous commands entered chronologically. I learned from a site how to add to that behaviour by autocompleting what I'm ...
2
votes
3answers
32 views

SED \n and \ into nothing

The people on this forum have been a tremendous help! Thank you so much! Here is my string ...
0
votes
0answers
23 views

Error in export command in ~/.profile

I have this line in ~/.profile: export PATH=/sbin:/usr/sbin:${PATH} and it is causing this in ~/.xsession-errors: init: gnome-session (Unity) main process (1851) terminated with status 1 And ...
0
votes
1answer
24 views

Help decoding Base64 using base64 -d

**** This post links to Windows-Based malware executables!!! DO NOT EXECUTE DECODED SAMPLE **** I hope I can post this here without having it pulled down. I have 2 seemingly identical base64 ...
1
vote
1answer
19 views

how to make scripts which will run on installation of apt package

I have created a bash script which will store some data into a mysql database. Then I have created deb file with that script and made it available for installation by creating local apt repository. ...
1
vote
2answers
28 views

Displaying TTY name in Terminal name

I am wanting to know how I can display the TTY a terminal is currently using in the window name of the Terminal. I don't see any options in Terminal Preferences to display such thing on the Terminal ...
0
votes
2answers
60 views

Locate two variable strings and write one as a file

I have a text document that contains 2 lines of information. Line 1 contains a filename, and line 2 contains an reference ID. The document contains additional strings other than the desired ...
1
vote
2answers
53 views

Cannot run bash script from crontab when it works from command line bash

I have a strange problem of being to able to run a bash script from commandline but not from the crontab entry for root. I am running Ubuntu 12.04. * * * * 1-5 root ...
0
votes
0answers
20 views

zip warning: No such file or directory

I have a backup bash script for my Dovecot emails like this sudo zip -y -r -q ~/backup.zip /var/vmail/* -r is for recursive, -q is quiet (since man said that's useful for bash scripts), -y is to ...
0
votes
1answer
43 views

How do I autorun terminal commands at startup in Lubuntu 14.04 LiveCD?

I'm doing some remastering of Lubuntu 14.04 LiveCD, and need to run the following command at startup: /sbin/ifconfig eth0 10.10.10.1 netmask 255.255.0.0 First, I tried modifying rc.local as ...
0
votes
1answer
43 views

Add custom script to PATH

I know there are quite some answers about that, but still could not make my way around it. I read all this and tried to follow the example under System-wide environment variables (for my case of ...
1
vote
1answer
45 views

Starting program via terminal and putting it immidiatly in the bg / bashrc

So i am trying to start a Programm by using the terminal but i also dont want it to be locked to the said terminal. i added an alias inside the bashrc for easy startup: alias tksuite='sudo sh ...
7
votes
2answers
589 views

Ending tail -f after print n lines

I have the following. A Java process writing logs on file A shell script starting the Java process. I need to read the log file after start Java process to check correct starting. I have try with ...
0
votes
1answer
9 views

Running Questasim in Ubuntu

I tried to install Questasim 10.2 in Ubuntu 14.4 32 bit.Everything was ok.But when I tried to run the Questasim it is showing an error bash: ./vsim: cannot execute binary file: Exec format error ...
9
votes
2answers
252 views

Deleting input back to the last forward slash

I will very often be flitting between several files on a server. I will run the following example commands in sequence: nano /web/site/path/to/file /web/site/script.py nano ...
0
votes
1answer
28 views

executing certain commands do absolutely nothing

I have installed 3 new packages recently through NPM and none of them are executing. I ran sudo npm install -g ionic and the installation looked like normal. Then I can run which ionic and I get ...
12
votes
3answers
862 views

What is the 'command' command and what is it used for? [duplicate]

I was trying to learn new terminal commands. Then I tried to write command to test what happens. Strangely, looks like it's a valid command, but what does it do? It didn't return anything.
0
votes
1answer
23 views

curl .gz file and pipe it for decompression

I am trying to download some .gz files (N.B. not .tar.gz ones) from given URLs and decompress them to overwrite existing files, if any. For each individual download, I tried the following: curl -O ...
0
votes
0answers
15 views

When running a shell script using sudo I am getting no tty present and no askpass program specified

I am trying to build a project using jenkins. The project is based on node. I wrote a shell script that has only npm install command. I am running the shell script from jenkins as sh ...
0
votes
1answer
11 views

How do I detect if the current session is an SSH session via bash?

I would like to detect whether the current user session is from an SSH connection - that is, whether the user is physically sitting at the computer that hosts the current terminal or whether he is ...
3
votes
1answer
23 views

Why doesn't yes fill up the buffer?

Say I do something like yes | apt-get install foo. I know that yes will non-stop print a bunch of y\n's to stdout. But apt-get can only process a few of those. Why doesn't yes fill up the buffer? Does ...
0
votes
0answers
29 views

How to set the path to xstream in Ubuntu 14.04

I am using Ubuntu 14.04, and installed my version of jdk using sudo apt-get install openjdk-7-jdk Now I installed xstream 1.4.7, but whenever I compile any java files using the package, I get an ...
1
vote
2answers
74 views

How to move files based on first word in file name?

In a folder, I have thousand of files, such as: cat eats mouse.jpg cat chases mouse.jpg gorilla eats banana.jpg gorilla is sleeping.jpg elephant is huge.jpg elephant has trunk.jpg (and so on...) I ...
4
votes
2answers
70 views

Difference between echo -e “<string>” and echo $“<string>”

What is the defference between using echo -e "Hello\nWorld" and echo $"Hello\nWorld" don't they both output: Hello World
1
vote
2answers
52 views

gibberish command not found on bash terminal startup

I have run across an issue that I just cannot seem to figure out. When I start my terminal in ubuntu (14.04) I get the message sdfsdfsdi: command not found As you can see it just looks like ...
0
votes
2answers
43 views

Install Sw in /usr/local but bash terminal doesn't see programs

I'm a newbie Ubuntu 14.04 User. I need Netbeans to develop software so I decided to install the 8.0.1 version. Since the pkg installer doesn't have the latest version, I downloaded the .sh file from ...
1
vote
2answers
200 views

Script doesn't work when it is run using '#!/bin/sh'

I have a script that use shebang : #!/bin/sh, but when I run it in my Ubuntu 14.04 terminal, it doesn't work and it says that some lines has unexpected operator. My friend in another computer could ...
1
vote
2answers
58 views

How to run commands from a bash file the way they run from terminal?

Sorry for my probably very naive question. What I mean is: how to create an executable script/bash file that would run more complex commands, commands which must normally be put in a terminal? ...
0
votes
1answer
20 views

Where does the output of a script that was run at startup go? [duplicate]

I have a script which is run at startup from rc.local, I don't redirect the output anywhere. When I first wrote it, I ran it in a shell, it worked as I expected and continually poured characters out ...
0
votes
2answers
34 views

updating my path not working

I want to add a script directory in my home directory (for something different then just adding to bin). I keep getting "No such file or directory" after updating. Now I noticed that in the GUI file ...
1
vote
1answer
49 views

jumping cursor when using python interpreter in terminal

When I am typing in a long command while using the python interpreter in terminal, the cursor will suddenly jump all the way back to the beginning of the line that was just typed and start ...
2
votes
1answer
35 views

Move Files To Directories Based on File Name

I have files that download to one directory (/media/Downloads/Complete/Movies) but need a bash script that moves them to the destination directory based on file name (/media/Movies_A & ...
-1
votes
2answers
34 views

How to add running program icon to left-side bar? [duplicate]

As in question, how can we assign an icon here? Regards
0
votes
1answer
32 views

unable to execute .sh scripts - only on one pc

This is an unusual problem for me - what would cause one pc to suddenly be unable to execute an install.sh script, yet two other pcs with the same OS have no problem doing so? I get various errors ...
0
votes
1answer
60 views

Run commands on system shutdown/reboot/logout [duplicate]

I would like to run certain aliases and simple commands when system shuts down or reboots or when I simply log out of system. This would help a lot as I usually forget about shutting down vagrant ( ...
2
votes
2answers
48 views

uniq command not working properly?

So I'm checking the md5 hash of my files with this as my output: 657cf4512a77bf47c39a0482be8e41e0 ./dupes2.txt 657cf4512a77bf47c39a0482be8e41e0 ./dupes.txt 8d60a927ce0f411ec94ac26a4785f749 ...
0
votes
1answer
16 views

autogen.sh can't find “ fontconfig” package

ran autogen.sh and get the error "package 'fontconfig' not found". I also get the suggestion to adjust the 'PKG_CONFIG_PATH' enviroment variable and/or variables "FONTCONFIG_CFLAGS" and ...
0
votes
1answer
44 views

rc.local not called when starting the system

Here is the full rc.local #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on ...
1
vote
1answer
39 views

Terminal Command to Zoom

I've been looking for this for a while, and I can't find it anywhere. I need to be able to zoom (equivalent of ctrl + shift + '+') via the terminal. I've tried xdotool, but do not know how to get it ...
1
vote
2answers
66 views

“mv” versus “cp” in a bash script [closed]

I am attempting to make a script that will be able to load up some settings and files to a board. Basically I will plus a flash drive into the board click on the script. The script will then ...
0
votes
1answer
26 views

Ubuntu bash if lessthan else condition returning error [: -lt: argument expected

I am doing the following script to know if profit or loss from entered selling price and cost price as; echo enter selling price read sprice echo enter costprice read cprice if [ $sprice -lt $cp ] ...
1
vote
1answer
92 views

What environment does xargs pass to grep?

I am trying to search for two strings in a file. This is the command that I am using grep -l -r ads2gas | xargs grep vp8 For some reasdon the second grep is not working correctly. I am getting "no ...
0
votes
0answers
22 views

Can only echo very limited numbers to USB companion files

I want to echo number 7 to the file /sys/bus/usb/devices/usb2/../companion, but fails. But if I echo number 1 or 2 to this same file, it works well. Any idea on that? nxr@nxr-desktop:~$ sudo -s ...
0
votes
2answers
67 views

lowercase to all files in a directory expecting to undo it at some point

Okay, so I want to batch rename files (and files within subdirectories) in a directory to lowercase, but I also want to undo that at some point. Should I store their real names somewhere so I can go ...
0
votes
1answer
24 views

git push script, only if difference

I've found some nice questions illustrating how one would write a script automating git push/pull with cron here and here, but I want to elaborate on that slightly. I only want to push/pull if there ...
2
votes
1answer
46 views

Trouble with simple script :(

Could someone please tell me why this script doesn't run correctly. Seems to be a problem with the if statement as i keep getting the error: /home/sinttx/Development/backup/ddbackup.sh: line 18: ...
1
vote
2answers
34 views

Select Top N files based on modification date and rsync them

I'm fairly new to linux and I'm trying to transfer some N files based on Modification Date. I've found this commandls -tr | head -100, which to my understanding, will list the Top 100 Files (head ...
0
votes
1answer
33 views

/var/log/secure not present in 14.04 ,is there any alternative?

While reading about Linux ,especially about sudo I got:: A message such as the following would appear in a system log file (usually /var/log/secure) when trying to execute sudo bash without ...