Tagged Questions
0
votes
1answer
18 views
Can't seem to get script/cron job to work?
ive written a ffmpeg script to mass convert mkv into mp4. when i run the script as my user, and enter my password for sudo privileges it works very well from the command line. the script is:
#! ...
1
vote
0answers
90 views
Crontab not running a script
I have set my crontab to run 2 script.
the first script is not running.
I set up on the crontab -e not sudo crontab -e
The error i have is this
...
0
votes
0answers
19 views
How can I write user given values into the network/interfaces file using an Sh Script
How to write a shellscript that asks the user to provide Network information and write it down to /etc/network/interfaces
0
votes
1answer
88 views
How to run a shell script without terminal
I have a shell command that executes a command and sends it through pipe to a python file. The python file does various checks on it and then starts processes with parameters using subprocess.Popen. ...
1
vote
2answers
256 views
After charging the permissions, why can't you execute a .run shell lscript from the terminal in ubuntu 13.04?
You used to double-click and it would ask you if you wanted to open it in the text editor or run in the terminal.
Now I have to open the terminal myself and type the appropriate shell command.
1
vote
1answer
41 views
Select on which partition reboot
Is there any way to select a partition for the next boot.
For example:
sudo reboot boot=/dev/sda2
I would like to make a system backup script.
0
votes
1answer
45 views
terminal closes when i run shell script
I wrote my own shell script, and I made it executable with "chmod +x" command. But when I click to shell file and want to run it in terminal, it suddenly opens and then closes in a second. What is the ...
0
votes
1answer
74 views
Bash script indenting command line
Hi I have used the following script, which after it has run and exited, causes my command line to display no text when typing, and after each carriage return instead of starting a new line like
...
0
votes
0answers
37 views
How to reconnect automatically to a wireless gateway connection that expires after some time?
I would like to connect to the Wi-Fi gateway of my university campus as soon as it stops using the command line and making a script. This connection can be established by entering the following ...
1
vote
1answer
90 views
How do I set up a background Image for console in ubuntu
Some of you may know this from opensuse. There the console is able to have a background. Is Ubuntu also able to have a backround image outside the x window system?
1
vote
0answers
25 views
apachectl configtest shows Syntax ok even errors are there in the configuration file
Given below is one of my apache configuration files:
<VirtualHost *:80>
ServerName testeight.qburst.uws
DocumentRoot /home/testeight/public_html/testeight1
...
3
votes
1answer
112 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, ...
2
votes
0answers
128 views
Launching php script through comman line - keeping terminal window open after execution
Oh, my girlfriend really likes it when I launch php scripts! There's something special about them, she says ...
Thus, I coded this script to run throught the CLI (Command Line Interface) - so it's ...
3
votes
1answer
76 views
Why can I only launch scripts via terminal?
If I want to execute a script (I already marked it as executable), a text editor opens the script. If I want to choose an app from the list, the system suggests me editors, browsers, etc (not even a ...
0
votes
1answer
185 views
how to use expect with bash
I Have created a shell script as given below.This script will login to a remote server as a normal user then switch to root user for creating a directory.The script is as given below.
ssh -t ...
1
vote
1answer
114 views
Can I write a python script that will automatically load a terminal as sudo?
I use sudo a lot and I am constantly having to restart my terminal (development of programs that froze usually) and it's a pain in the butt to constantly put in the sudo command and then my password. ...
5
votes
2answers
76 views
Why are my bash script's arguments causing an error?
In order to make uploading the code to github easily, I created a sh script
#commit.sh
git add .
git commit -m $1
git push origin master
But when I run it by saying ./commit.sh "comment1 comment2 ...
1
vote
0answers
45 views
Continue script in terminal after pkill fullscreen program
I'm running a fullscreen program and i'm using pkill to close it by a keyboard shortcut. Killing the program works but my kill script also contains some other code. The rest of the script isn't being ...
0
votes
1answer
40 views
grant command syntax error near password in shell script
I am stuck with an issue with shell scripting.
I have already used \ character before double quotes (") because of some reason, as in the following line of my shell script.
sql2=\"grant all on ...
1
vote
0answers
17 views
Bash Script to set “system wide” proxy settings [duplicate]
I am wondering if there is a command (or series of commands) that would do the same thing as network-network proxy-apply system wide.
I believe I can export a variable, but I think that that button ...
0
votes
0answers
80 views
useradd shell script
how to write a shell script for useradd ?
My problem with shell script is that it is not prompting for password.
"passwd $username" is not working. Please help me if anyone could.
Regards,
0
votes
1answer
95 views
shell script, read is not waiting with ssh
Hi all I am new to shell scripting and please help me in this situation.
I have created a shell script named ./remote1 which looks like below.
# ./remote1 file
ssh username@x.x.x.x 'bash -s' ...
1
vote
1answer
94 views
What programs should I use to get a picture of resource usage on Ubuntu ?
Every now and then my computer gets completely unusable. So unusable I can't even open a terminal and run top to figure out what is going on.
I want to create a script that collects data (cpu usage, ...
2
votes
1answer
95 views
How do I create a shortcut and place on the desktop?
I would like to create a shortcut which will cd to a particular directory and then execute a .sh file, thereby opening my application.
At the moment I enter the following into the terminal:
cd ...
2
votes
0answers
85 views
Tell if windows are open and not minimised from shell script Unity
I'd like to add into my .bashrc a little script that sets the terminal background to transparent iff I don't have any non-minimised, non-terminal windows open and leaves the terminal background as ...
1
vote
2answers
81 views
Start or Stop a server with a single script launcher
I made 2 .sh scripts to start and stop Xampp server. I'd like to merge them in a single launcher to obtain something like a ON/OFF button, so that if Xampp has already been started it would stop, but ...
0
votes
1answer
133 views
Terminal command script launcher
I am trying to create a desktop shortcut or script that will automate terminal command input for me to open a program.
cd /Downloads
cd /GrooveNet-master
cd /project
cd /bin
./groovenet
Once ...
2
votes
0answers
46 views
How to create a script that would execute a command at double-click? [duplicate]
Possible Duplicate:
How to make a script that opens a terminals and execute commands in them
I want to know how to create a script that I could put on the desktop and execute on ...
0
votes
1answer
100 views
On Ubuntu Server 12.04, how do I make a shell script that replaces underscores with spaces recursively?
So far I have:
for file in *\_*
do file_clean="${file//_/ }"
mv --verbose "$file" "$file_clean"
done
However, it only renames files in the root directory of the folder. How do I make it rename the ...
2
votes
3answers
237 views
How do I search a folder for all zip files, unzip them, then 7-zip the root folder as 1 large zip?
I have a problem. I need to compress a root folder, but it has a lot of ZIP/BZIP/TAR files in its subfolders. Can someone show me a script that will search and unzip each subfolder's zip file and then ...
2
votes
1answer
41 views
how to switchback to user with uid 1000 in shellscript
I Have created the following shell script.
#!/bin/bash
...
#Cleanup
sudo update-rc.d mysql defaults
sudo update-rc.d apache2 defaults
ln -s /etc/drupal/7 /home/$USER/drupal
...
2
votes
2answers
93 views
How to use single-thread script to do batch processing?
I have a single-thread python script that gets used like this:
python -c "arg"
I also have a *.txt file with many arg, each in one single line in the respective *.txt. A text file, say 1.txt ...
1
vote
1answer
105 views
How to I insert a command into a script located on a remote server?
I want to insert rm $0 in a script (/home/user/config-script) located on remote server with echo "rm $0" >> /home/user/config-script with expect. But fail because expect interprets $0.
...
3
votes
1answer
67 views
Launching a program with several files through terminal expansion problem
I'm making a program that launches vlc with a set of files saved in a variable.
But it doesn't work it seems to have a problem with the names, what is weird (for me) is that in the end the problem is ...
0
votes
0answers
25 views
access to drush for all users
How do I set up drush after install via sudo apt-get install drush so that all users on the system have full access to it without getting error messages when they don't use sudo in front of it.
0
votes
1answer
432 views
Crontab and Shell Script not Executing [duplicate]
Anybody any suggestions on why my crontab and shell script is not running.
I have
chmod +x my shell script and added the following into crontab -e
*/5 * * * * bash cd /home/jclark/scrips/ipcheck/ ...
6
votes
2answers
129 views
How to use sudo with pipelines? [duplicate]
Possible Duplicate:
sudo & redirect output
Let's say I want to add some line into /etc/profile.
I try:
$ sudo echo "something" >> /etc/profile
bash: /etc/profile: Access ...
0
votes
1answer
81 views
Restart memcached and a java server using script
As of now, I am using the following commands to start, kill, restart my application on ubuntu.
ps -ef | grep memcached
ps -ef | grep java
kill -9 "pid of memcached and java"
sudo ...
1
vote
3answers
180 views
How do I run a script at start up?
I know that this is probably pretty easy to do, but I'm not a Linux person (I'm trying to learn more). I have a script in a folder:
/path/to/my/script.sh
I need this script to run every time the ...
1
vote
1answer
358 views
How to use a C program to run a command on terminal?
I want to create a program in C language that would allow me to run a command in the terminal.
I have made a program in shell script which would give me the ip of any website that is opened in my ...
2
votes
2answers
64 views
Editing a command-line argument to create a new variable
I have a bash script called test.sh that uses command-line argument:
lynx -dump $1 > $name".txt"
But I need name to be created from the argument by specific keywords in the argument.
An example ...
1
vote
1answer
31 views
Why doesn't super key display some scripts?
I recently downloaded CrashPlan for my laptop running 12.04. It installed a shortcut to the desktop to the GUI which is pointing at /usr/local/crashplan/bin/CrashPlanDesktop (a shell script). This is ...
4
votes
2answers
196 views
What's the difference between root account and simulated roots?
So if I disable my root account with sudo passwd -dl root I still have access to sudo {su,bash} or sudo -{s,i} conceptually how are the elavated rights different from the root account?
I know the ...
2
votes
1answer
104 views
Using Vim as external editor using only one instance
I'm playing a game that has a scripting language. It has a button to open the scripts in external editor. You can set the command that will trigger the editor from within the game's interface.
...
1
vote
1answer
44 views
How to install a bin file to a particular target location?
I need to install a bin file. My home dir is /home/user
The bin file is present at /apps/ba/software
I need to install this at /apps/ba/ins
How can i do that.
5
votes
2answers
67 views
How to save images from web links given in .xls file
I have an xls file which has weblinks of product-images. The number is about 5000. Can you advise me how can I save these images on my computer.
Given here below is a link just to narrate the example.
...
4
votes
2answers
196 views
How to check how long a video (mp4) is using the shell?
I need to ftp upload all the mp4 files in a directory with length > 4 minutes using the shell. I can't find any script to check how long a video is. Does anybody have any idea how to do that?
Thank ...
1
vote
2answers
167 views
Running scripts from another directory
Quite often, the script I want to execute is not located in my current working directory and I don't really want to leave it.
Is it a good practice to run scripts (BASH, Perl etc.) from another ...
1
vote
2answers
460 views
Create startup terminal program
I would like Ubuntu to open up a terminal window and apply the following code upon login:
xrandr --newmode "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
xrandr ...
3
votes
3answers
639 views
Cannot use “./” to execute a shell script
Maybe someone here would be able to help me out. Have installed Ubuntu 12.04 LTS (kubuntu) on two machines. The .bashrc and .bash_profile files are identical as the file structures on each machine is ...


