1
vote
1answer
261 views

How can I save some terminal commands as a file and run them?

I am using OpenSuSe 12.3 I want to create a link on my desktop for some specific terminal commands. The background is that I do some backup via rsync and don't want to type the commands every time. ...
1
vote
1answer
211 views

In a Shell scripts, check version of installed package, make a decision based on output

Looking to write a cross distro / cross version shell script that makes sure a forced version of PHP is installed Example: Ubuntu 12.04 has 5.3, Ubuntu 13.10 has 5.5, Debian 7 has 5.4 I need this ...
1
vote
1answer
219 views

run a shell script on terminal if terminal is idle for few minutes in linux

i can get terminal idle time by w command as follows $ w 14:37:58 up 2 days, 20:16, 2 users, load average: 0.12, 0.16, 0.14 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT ...
0
votes
1answer
116 views

A way to paste predefined list of text in bash script to browser?

I am looking for a way in bash to paste a few lines (which will be selected in a loop) to a form on a webpage at a certain location (i.e to a specific field on a page). Is this possible? Hope I've ...
3
votes
2answers
2k views

How to add commands of windows to local shell of XShell 4

XShell is a very powerful tools to ssh remote computers such as Unix/Linux. And it has built some internal commands for you to run within your Windows. Xshell:\> help Internal Commands: new: ...
0
votes
1answer
989 views

Open a terminal window & run command, then close the terminal window if command completed successfully?

I'm trying to write a script to do the following: Open a terminal window which runs a long running command (Ideally) move the terminal window to the top left corner of the screen using xdotool Close ...
1
vote
2answers
253 views

How do I delete a directory from Terminal without knowing its name?

I have a directory which I want to delete. The directory's name is a random string of letters and numbers. I know the path to its parents directory, so how would I recursively delete the contents of ...
3
votes
3answers
324 views

xargs argument redirection

This seems to be a trivial problem but the solution eludes me ever so cautiously. I want to clear out many text files; log files. Reason? To save on disk space. With one text file, this is as ...
0
votes
1answer
627 views

Run a shell script in an existing terminal session

I'm writing a script to deploy a project to multiple servers (9 and counting). With compression, copying, and remote connections, the script is rapidly becoming fairly slow. So now I'm investigating ...
-2
votes
0answers
49 views

Create an executable from a shell script in OS X [duplicate]

Possible Duplicate: Can I create a configuration file for a shell script? I need to create an executable from shell (.command) in OS X, with parameters. Example: backup -s1 -s1 is ...
0
votes
2answers
559 views

Downloading files from FileSonic via terminal without a premium account

I found various blogs on the internet about how to download a file from FileSonic, Hotfile, Rapidshare, etc. from a Linux terminal if you have a premium account. Is there any way to download a file ...
6
votes
5answers
9k views

Run a shell script on OS X without having a terminal window appear?

I'm trying to set up a few keyboard shortcuts that open specific iTerm sessions, which I was able to do with BetterTouchTool and a bit of AppleScript magic. The problem is that OS X insists to open a ...
2
votes
1answer
1k views

Why won't my bash script work?

I'm getting more comfortable with the terminal in Mac OSX and I thought I'd have a dabble at bash scripting. Not wanting to crawl before I could sit down I wanted to write an incredibly simple "Hello, ...
1
vote
1answer
325 views

How to stop printf from printing escape codes in shell script?

When I run a simple shell script with the following code: #!/bin/sh printf "\e[32m Hello World\n" I get \e[32m Hello World as output as opposed to a green Hello World output.
1
vote
1answer
1k views

How can I execute a shell script without exit? (Mac OS X)

I'm making a shortcut icon on my Dock which opens a terminal window with some preconfigured environment variables. I made a script and dragged it into my Dock. It runs well, however it exits ...
6
votes
3answers
425 views

Portable method of opening a new terminal window?

So, I'm working on a custom makefile script (for TinyOS, if anyone cares) that builds a file and then runs it in a simulator. The problem is that the simulator takes it's input from standard in, and ...
0
votes
2answers
2k views

Open new terminal from script to get user input and use input in script

Is it possible from a background shell script to open a new terminal (xterm, gnome-terminal, whatever), get some user input, close the newly opened terminal and use the data that was input?
0
votes
3answers
150 views

How to loop a script execution with param from a text file?

I need to run ./pythonScript keyword one time for each keyword in a text file, how can I do this from a gnome terminal? (without having to modify the pythonScript) pseudo code: for each keyword in ...