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
30 views

Why doesn't this second nohup command run?

Everything runs except the last line: #!/bin/bash xinput set-prop 11 "Device Accel Profile" -1 xinput set-prop 11 "Device Accel Velocity Scaling" 1 xinput set-prop 11 "Device Accel Constant ...
0
votes
2answers
364 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
53 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
166 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 ". ...
1
vote
1answer
23 views

Concatenate of Hostname in script is not working

I have to concatenate the Hostname in a file name and ssh it to a machine what i have currently is scp ../output/OutputFile50.txt sarah:~/client/output/OutputFile50${HOSTNAME}.txt it is working ...
1
vote
1answer
389 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
381 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
205 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
22 views

Open screen and run some projects and applications

I am a python web developer, I need to run my local 3-4 django projects in screen sessions and need to launch some of my applications like skype, chrome, eclipse and a text file daily status.txt. Is ...
0
votes
1answer
15 views

How to take/release control of output?

I have two parallel processes running shell script, each will print to stdout from time to time using echo. But sometimes the output may mixed up. Is there a way to take exclusive use of stdout, then ...
0
votes
1answer
25 views

how to bold the characters using echo

required output of echo in bold letters while using echo command I want the content to be bold and it should have same bold view while appending echo output to the file echo "hi">test.txt i want hi ...
0
votes
1answer
46 views

Shell script exits without evaluating if condition

I have the following commands in my shell script #This line basically builds a source library $BUILD_CMD $CONFIGFILES/$1.prj $BUILDFILESPATH if [ $? -eq 0 ];then echo "Build success\n" #do ...
0
votes
1answer
15 views

Ubuntu send alert mail if CPU usage continusly heigher than a certain amount

I need a way to send alert email if the CPU usage is higher than 80% for more than 5 minute. Installing new software on the server not allowed for me. Is there any way to handle it through a shell ...
0
votes
1answer
55 views

Can't install HoNClient-3.4.3.sh

I'm desktop user. My OS running 32-bit Ubuntu 14.04LTS. The problem I've run into is this: When I try to run the client in the terminal, using the command: sudo sh HoNClient-3.4.3.sh it gives me ...
0
votes
1answer
41 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
51 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
223 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
30 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
66 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
44 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
269 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
183 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
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
56 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
41 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
323 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
621 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
194 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
34 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
101 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
316 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
124 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
42 views

unable to run script using “startup applications” option in ubuntu 14.04

I am trying to run following script to run my rails application on startup but unable to execute. run_my_app.sh #!/bin/bash cd /home/<user>/<my_rails_app> && rails server ...
0
votes
0answers
31 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
183 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
20 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
36 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
214 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
31 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
65 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
43 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
37 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
76 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
132 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
81 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.