0
votes
1answer
44 views

Macxchange Script to Change MAC and Hostname in ubuntu 12.04

I'm trying to adapt a script in backtrack to work with ubuntu. I keep getting an error on line 14 which is the "if [ $? == 0 ]; then" line the script was found on ...
0
votes
0answers
51 views

Problem in Social Engineering Toolkit in My Ubuntu 12.10 System

I Just Installed Social Engineering Toolkit (SET) in my machine in /opt/ directory . i allready installed Metasploit , and changed metasploit directory to /opt/metasploit set_config file from ...
1
vote
0answers
20 views

Need to remove Metasploit from my Ubuntu 12.10 system [duplicate]

Tonight I installed Metasploit in my Ubuntu 12.10 it did not work properly, so i removed it by executing the following command in terminal sudo rm -r /opt/metasploit now when i try to re-install ...
1
vote
2answers
55 views

Installing packages remotely via bash script in ubuntu

I am trying to install firefox packages to all my linux hosts remotely using a bash script. But when ever i execute the script i get the following error. How do i enable DISPLAY in bash script? ...
3
votes
1answer
110 views

Help Debugging Backup Script

Every 3 hours the script will run and backup a folder "SOURCE" and it will save it along with the other backups of the current day in the folder "month-day-year" e.g. "03-24-13". When a new day comes, ...
5
votes
1answer
57 views

How to get select statement choices into If statements?

I'm very new to programming on Ubuntu. And I'm trying to do a simple bash script. I have a select menu working but I want the choices made in that to go into a number of if statements, corresponding ...
11
votes
1answer
162 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 ...
2
votes
1answer
43 views

awk quoting program text

I just came across a gotcha in awk, and I would like to know if anyone can explain to me why this happens. The following 2 lines behave differently if I run: # grep -Rl BASE_DIR --exclude-dir=.svn * ...
2
votes
1answer
133 views

Why does “if [ 0 ]” execute the “then” statement in bash script?

This guide says: An if/then construct tests whether the exit status of a list of commands is 0 If I execute 0 in the bash, it says: 0: command not found So its exit status is not 0, and [ 0 ] ...
0
votes
1answer
77 views

bash script : is it possible to recognize video format from files (to batch extract audio from them)?

I have written a little bash script to extract audio from video files in batch mode. Sound is extracted from each mp4 file to flac format using avconv (and the flac codec). #!/bin/sh # # Batch ...
1
vote
1answer
55 views

Configure Fail2Ban with bash script

I'm trying to configure the /etc/fail2ban/jail.local config with an bash script. I was thinking to use sed and regular expression to change the sections I need. sed -i "s/^bantime = 600/bantime = ...
1
vote
0answers
49 views

Execute custom bash script with sudo without passwd prompt [duplicate]

I run ubuntu-12.04 desktop x86_64. I have a simple script that needs to be accessible from the Desktop and run as root: $ cat ~/Desktop/flash.sh #!/bin/bash - cd ~/tools sudo ~/tools/fastboot-HW.sh ...
0
votes
0answers
35 views

Can I store a password in a bash script? [duplicate]

Is there some way to store (for example hashed etc.) secured password in a script that will be used during connection to server? Storing password and username as clear text in code for me is quite ...
3
votes
1answer
272 views

Unable to apply wallpapers

We are unable to apply wallpapers, we are getting the following error. How do i fix it?? Error: Error setting value: Can't overwrite existing read-only value: Value for ...
0
votes
1answer
108 views

shell script to install and run

I am trying to make an automatic installer which downloads file from ftp and installs it on system . Host = "zzz " USER= "ss" PASSWD = " xxXX" FILE = " *.tar" ftp $HOST << EOF user $USER ...
-1
votes
3answers
64 views

Bash scripting issue for a bifurcation diagram data generation

I'm brand new to this forum (doesn't mean I didn't used it before) but today I've a very important question with wich I found no help on the web. I've a Bash script that doesn't work and I don't know ...
4
votes
1answer
116 views

Why Byobu custom status notification code fail to show in color?

The code below runs well in Bash and shows text with proper green background color but when I add it to the ~/.byobu/bin/ folder it shows the escape characters instead. Something like ...
3
votes
2answers
969 views

What is the difference between “source x”, “. x” and “./x” in Bash?

I have one bash source run.sh as follows, #!/bin/bash if [ $# -ne 1 ]; then exit fi ... when I execute it in two ways, there are different behaviors. The first way is, source run.sh It will ...