In shell scripting, a shell such as bash runs a file containing a list of commands (a script). The script is effectively a program and the shell is its interpreter.

learn more… | top users | synonyms

0
votes
2answers
281 views

How to list active displays (on command line)?

xrandr -q gives me a list of connected displays, but how can I find out (script friendly) if a display is currently active? Context: I would like to write a script to toggle a Display. If it's ...
0
votes
2answers
52 views

Add my password as part of the script or argument?

============== #shell script sudo ls ============== When I execute it, script asks for the password. I would like to add my password as part of the script or argument. How can I do it?
0
votes
2answers
147 views

Can I use source test1.sh with gnome-terminal -x?

I am executing 2 shell scripts from the main using source. main.sh: #/bin/sh a=1 b=2 c=3 gnome-terminal -x sh -c ". ./test1.sh|less" (note the source ".") gnome-terminal -x sh -c ". ...
0
votes
2answers
341 views

Why syntax error near unexpected token `fi' is coming

This is my simple script but it is saying that syntax error near unexpected token `fi' mysql --user=root --password= erpint -B -e "select * from user_info;" | sed ...
1
vote
1answer
189 views

Permission when running script in Vagrant using Vagrantfile

I have created a vagrant box for running rails applications and I have managed to create it manually. My next step was to create a shell script that I can include in the Vagrantfile so when creating ...
1
vote
1answer
53 views

Telnet at Login Question

I am trying to setup a dummy terminal. The system automatically signs in as the user I want. The next step is for it to automatically telnet to a server. I have the autologin working and the ...
1
vote
1answer
346 views

specify non-printing keys as input to shell command

Ubuntu 12.04 LTS Server 64 I have a shell script that runs in unattended mode. The script executes a command that displays a curses/ncurses UI which normally expects the user to navigate a menu via ...
1
vote
1answer
198 views

Shell script now working on post/get request

I have a simple script in php to fetch files from my github repository <?php echo shell_exec('git pull'); ?> When I ssh into my server and run this script like this: php github.php I see ...
0
votes
1answer
13 views

How can i Download attachments from an email using Python?

My Current python script can download attachments from Gmail. But i want to Download Attachments from any other email services than Gmail. Ex: Other email services are ymail, hot mail, etc .. Is ...
0
votes
1answer
30 views

Unigine Heaven run directly from terminal?

I think a lot of you would have benchmarked your Linux system using Unigine Heaven Benchmark 4.0. I know to run the it you can simply go to the Unigine Heaven folder and run the shell script file ...
0
votes
1answer
93 views

Curl request not working

Can some help me out in this.? I tried making a curl to random web pages it works fine. This address mentioned below i tried via browser it also works but when i try this via shell it does not work. ...
0
votes
1answer
27 views

What does simply giving path in shell script means?

I'm going through a shell script coded by some old folks working on my current project. At the end of a file, it simple have the folder/file paths like, /home/udhay-dev/work/udhay/bin/rm-vhosts ...
0
votes
1answer
60 views

How to run a program automatically in Ubuntu?

How can I run a program in the Terminal automatically in Ubuntu? How to make a shell script to print the output into a text file?
0
votes
1answer
38 views

gui builder for shell script

Is there any gui builder tool for shell script. So that the interface can be designed by click and drag. Is there any plugins for eclipse or any existing ide to do this?
0
votes
1answer
205 views

initclt not seeing init script in Ubuntu 12 64bit

I created an init script in LSB format, and copied it to the /etc/init.d directory. I can manually start, stop, status the service and all works fine. I then try to set the service to auto stop/start ...
0
votes
1answer
182 views

shell script to set time and date on ubuntu

my desktop CMOS battery is not working, therefore I have to set time and date each time my computer starts up. I want to create a shell script to automate the setting of date and time on my computer ...
0
votes
1answer
49 views

Unmount script running on unmounted device

How can I unmount a USB drive using a script located on that drive? The device appears busy when the script is running,
0
votes
1answer
4k views

Compilation error when installing Realtek 8192cu driver

I'm using a laptop with Ubuntu 13.04 64 bits. After "fighting" for some time, I gave up trying to have my Realtek 8188ce wireless card work properly (the wifi connection is annoyingly unstable). So I ...
0
votes
1answer
143 views

Shell script to check if something is plugged in the wifi USB port

I have a wifi access point that allows to plug a USB hard drive accessible from any computer sharing the same wifi. I would like to know if there was a way a shell script could test if something is ...
-1
votes
1answer
54 views

Script for running Exe on all files in different sub folders and for capturing the output in text file

I have an exe file which takes .jpg as input and returns 4 values as output on the console. I have many directories and in each of them I have some images. Can you please tell me how to run this exe ...
-2
votes
1answer
39 views

edit file in shell script

I'm new to Linux. I'm running a simulation package on Linux. For each iteration, a file as below will be generated. I need to do some modification and then use the modified file as an input for the ...
2
votes
0answers
313 views

How to persistently maintain cloned mac address on Network Manager?

I'm on Gnome 3, and it seems like I'm able to add cloned mac address to my network interfaces from the GUI wizard of Network Manager. The catch is, every time I reboot my computer the cloned mac ...
2
votes
0answers
609 views

Script to quit and restart nautilus doesn't work

As I pointed out in my question nautilus theme problem in 12.04 I have to type 4 commands after every logon as workaround for a theming problem. Since I didn't find a real solution I decided to put ...
2
votes
0answers
190 views

Block unauthorized usb device. Disable automount

I wrote a bash script that checks every second for new mounted USB devices. When a new device is mounted, my script gets its serial number and compares it with the serials I wrote in a text file, ...
1
vote
0answers
33 views

How can I automatically reboot machine after usb pull off?

I have this situation - I've got a boot-able pen-drive with Ubuntu 12.04 for automated installation - when I plug the USB stick in installation begins from it. At the end of installation process I ...
1
vote
0answers
96 views

Changing ESC to ALT-F4 While running sh script?

Is there anyway to change ESC to ALT-F4 while running a shell script that is run by Advanced Launcher(XBMC) it then runs Google-Chrome in kiosk mode? But since I am using a controller with limited ...
1
vote
0answers
293 views

Execute a shell-script when closing laptop lid

Now I have two scripts and I want to execute them respectively when I close the laptop lip and open it. How can I do this?
1
vote
0answers
123 views

How to set grub install device non-interactively

I'm writing a bash script that runs on a fresh install of Ubuntu 12.04 and installs a bunch of packages non-interactively. The problem is that grub reports the following error when I run apt-get ...
0
votes
0answers
14 views

how to install ksymoops on Ubuntu 14.04

I want to analyze kernel crash(Oops) using ksymoops. I am trying to install ksymoops on Ubuntu 14.04(LTS) 64 bit using command sudo apt-get install ksymoops but unable to install. Below mentioned ...
0
votes
0answers
46 views

c programming within shell scripting

The code is as follows: #!/bin/bash ./finger/fingerprint /dev/ttyUSB0 /status.txt /template.txt; wait clear fingerstatus=`cat /root/status.txt` if [ "$fingerstatus" = "AUTH" ] then echo ...
0
votes
0answers
123 views

move files and auto rename if same name | bash script find all *.extension

Something like "--auto" in: http://doc.bazaar.canonical.com/beta/en/user-reference/mv-help.html It seems a bit complicated to --no-clobber (-n) and work on return codes if [ $? -eq 1 ];then ...
0
votes
0answers
16 views

reverse shell to ubuntu returns input as output

i start a reverse shell session from an an ubuntu 12.04 server to my host 12.04 desktop. the specific actions i take can be seen here: How to open reverse shell from NOWASP? but in a nut-shell, i ...
0
votes
0answers
34 views

How to open reverse shell from NOWASP?

I'm using 12.04 LTS and the server is 12.04 LTS server. So, I'm teaching myself some pen testing and right now I'm trying to use netcat to open a reverse shell from nowasp, my nowasp is on a VM and ...
0
votes
0answers
26 views

MYSQL redump from a log.sql all or nothing

MYSQL re dump from a log.sql all or nothing mysql -h "$databaseHost" -u "$username" --password="$password" "$databaseName" < /path/to/project/log.sql if this log.sql file contains an error in ...
0
votes
0answers
208 views

How to use Hadoop streaming input parameter for matlab shell script

Actually i want to execute my matlab code in hadoop streaming. My doubt is how to use hadoop streaming input parameter value for my matlab input. For example , This is my matlab file imreadtest.m ...
0
votes
0answers
19 views

Startup script for pxeboot

I am working on pxeboot. Now i want to do startup script in pxeboot server and whenever client started the startup script will run on the client machine. How to do that. ?
0
votes
0answers
29 views

Unmount partition from script, but keep desktop icon?

I dual boot Xubuntu 12.04 with Windows 8. I have a couple of games installed on the Windows side that also work well under Wine. I have a script that checks to see if the Windows partition is mounted ...
0
votes
0answers
40 views

How to “simply” execute commands when connected to a specific network without wicd if-up or cuttlefish

1) getting /etc/network/if-up is too complicated and just not working. I don't want to do it this way anyways. On Android I can do this simply with tasker. 2) cuttlefish would have been a good option ...
0
votes
0answers
57 views

Create new domain tools or script?

I'm new to *nix, Ubuntu, and nginx and so far it's a lot of fun playing around with new technology. However, after following tutorials on how to setup a new domain (server block) I can see how this ...
0
votes
0answers
42 views

ffmpeg-video trim from the end of the video

I have some videos of different duration.I want to cut(remove) the last 5 seconds of all videos.Can i use 'ffmpeg' in a loop to trim the videos?please help me.
0
votes
0answers
36 views

Need a shell script to loop launching a connection to a thin client, waiting, logging off, then connecting to a windows 7vm

I'm very new to Ubuntu and I need to have a shell script to do what the title says. I used: xfreerdp -u [uname] -p [password] -o --plugin drdynvc --data rdpeusb -g 1280x1024 -- [vm's ip] to make ...
0
votes
0answers
69 views

iHeartRadio - Looping for changed Auth Code

I have a bash script I'm running that plays a station from iHeartRadio in the CLI. I also use it to record a show in the early morning on my RaspPI so I can listen later in the day. The script works ...
0
votes
0answers
185 views

exec php command cannot execute in ubuntu 12.04

My system is running in ubuntu 12.04 and I already install LAMP. I have "test.sh" file and that file execute in PHP through exec(test.sh). The test.sh working fine from terminal but when i tried to ...
0
votes
0answers
123 views

screensaver script

I'm using Ubuntu 12.04 LTS 64bit. I need to write a script which would automatically add some images from a FTP server, and the screensaver would run a slideshow of these. Any suggestions or help will ...
0
votes
0answers
80 views

Book on how to use Ubuntu

Can someone suggest me a free e-book on how to use ubuntu (shell-scripting, commands and stuff)? I am fairly new to ubuntu and am using 13.04.
0
votes
0answers
21 views

Display images on LCD

I need to display images(pic) which is stored in Nand flash(File system-mtdblock5) on LCD. Is there any Linux command to display Images on LCD?
-1
votes
0answers
33 views

java install shell script

Hi i need to write shell script which first check java is installed if not download and install.This is my script.But my machine already installed java.Then it is downloading(apt-get install).So can ...
-1
votes
0answers
53 views

How do I fix this exception while loading JAI libraries in Linux shell script?

I have created a Java application in Eclipse which uses JAI libraries for creating image. It works in Eclipse but while running the executable file in Linux it shows exception at the time of image ...