Hi there,
After running a c program, giving it some input on the command line (the program simulates a pushdown automata), I get the following response:
bash: A: unrecognized history modifier
I have googled, but I can't find an explanation as to what this means exactly. My program works with other test input, so I assume it's somethin...
hi. maybe it's a bit strange - and maybe there are other tools to do this but, well..
i am using the following classic bash command to find all files which contain some string:
find . -type f | xargs grep "something"
i have a great number of files, on multiple depths. first occurence of "something" is enough for me, but find continue...
Say I have a bunch of time stamps
As I iterate over these timestamps,
01:23:00
12:34:14
17:09:12
...
I want to include only timestamps between 08:00:00 and 17:00:00
please suggest
...
Greetings!
I have a text file with parameter set as follows:
NameOfParameter Value1 Value2 Value3 ...
...
I want to find needed parameter by its NameOfParameter using regexp pattern and return a selected Value to my Bash script.
I tried to do this with grep, but it returns a whole line instead of Value.
Could you help me to find ...
Hello,
For the first time, I am asking a little bit of help over here as I am more of a ServerFault person.
I am doing some scripting in Python and I've been loving the language so far yet I have this little problem which is keeping my script from working.
Here is the code line in question :
subprocess.call('xen-create-image --hostna...
There are often times that I want to execute a command on all files (including hidden files) in a directory. When I try using
chmod g+w * .*
it changes the permissions on all the files I want (in the directory) and all the files in the parent directory (that I want left alone).
Is there a wildcard that does the right thing or do I ne...
For example:
In Perl:
@array = (1,2,3);
system ("/tmp/a.sh @array" );
In my shell script, how do I handle this array in shell script? How do I handle the shell script to receive the arguments, and how do I use that array variable in shell script?
...
I want a folder /public_html to symlink to /current/app/webroot, both are in the same directory
I have tried
ln -s public_html current/app/webroot
amongst other things, but no joy so far. Any ideas?
...
I need to run this command in Groovy when click on button
bash copy.txt > copy.log
I tried with execute but not worked out .
Could any one please help me
thanks in advance
sri..
...
A question on basics : While tuning environment variables for a program launched from a script, I ended up with somewhat strange behaviour with sh (which seems to be actually linked to bash) : variable setting seems to mess up with command-line parameters.
Could somebody explain why does this happen?
A simple script:
#! /bin/sh
# Mes...
Hello.
I'm writting a script to automate creating configuration files for Apache and PHP for my own webserver. I don't want to use any GUIs like CPanel or ISPConfig.
I have some templates of Apache and PHP configuration files. Bash script needs to read templates, make variable substitution and output parsed templates into some folder. ...
Hi all,
i'm trying to write a simple gui application to manage ruby version manager.
i started with some stuff like testing how ruby's %x[ ] works..
i made this function
def do ( command )
%x[#{command}]
end
if i try to use this function with one of the rvm commands like "rvm list" or rvm -v i get
a command not found: error.
the s...
I have a little bash function to log my Macports outputs to a file (since installs often spew little tidbits that are easy to lose in terminal noise), then I just cat the file to the terminal:
function porti {
command sudo port install $@ >> $1.log 2>&1; cat $1.log
}
Is there a way to do this concurrently?
BTW I pass $@ to instal...
I have an tarball, myarchive.tar.gz. When I uncompress it using "tar -zxvf myarchive.tar.gz", it creates a folder myarchive-x980-2303-ssioo. What's the easiest way to automatically rename the extracted folder to ensure it matches the name of the archive? I've checked tar's manpage, but it doesn't seem to have an option for this.
...
this works:
nc shldvgfas005 6155 < temp.6153
this hangs:
cmd="nc shldvgfas005 6153 < temp.6153"; $cmd
this gives an error:
cmd="nc shldvgfas005 6153 < temp.6153"; "$cmd"
-bash: nc shldvgfas005 6153 < temp.6153: command not found
HELP!
...
I'm looking a program to recursively inline all \input{} commands in a LaTeX file. By "recursively", I mean doing the inlining iteratively until no \input{} command remains in the final LaTeX file.
I've already come across the flatten package. But, for some reason, my TeXLive distribution doesn't install it. When I execute the command s...
Hello there,
I've been trying to install lpng142 on my fed 12 system. Seems like a problem to me. I get this error
[root@localhost lpng142]# ./configure
bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory
[root@localhost lpng142]#
How do I fix this? and for more details, I shall include the /etc/fstub file deta...
I'm trying to copy files to the current directory using a bash script.
In order to handle paths that need escaping a variable is used that is escaped and then supplied to the cp command.
The cp command is complaining with:
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n]...
Is there a way to define a logout script for the Cygwin/X X Server? I'm looking for something like .bash_logout, but only run when the Cygwin/X X Server shuts down. I'm using .startxwinrc to start programs when the X server starts, but I haven't found something similar for when it shuts down. Any ideas?
...
I'd like to set my bash prompt to a fixed width, and make up the difference in space before the $, so whether long or short, my prompt remains the same width:
[name@host] ~/Directory/Dir...Another/LastDir $
[name@host] ~/Directory(branch) $
Currently, in a short directory path my prompt looks something like this:
[nam...