General :: Running Shell Script Taking Command Line Arguments In A Jsp Page?

Feb 10, 2011

how to run a shell script taking command line arguments in a jsp page.

View 1 Replies


ADVERTISEMENT

Software :: Taking Command Arguments From Serial Port Into Shell Script

Jun 11, 2011

I have a linux system connected to an external sensor device that spits out strings of serial data every few seconds. I need to send the data to a remote URL for logging and graphing purposes.

The data coming down the serial is essentially in the format:

And I need to call a URL from my linus box in the format

wget -s [url]

I can read the data to the shell using cat </dev/ttyS0 but I'm now stuck as to how I might then format that data and pass it to a shell script which would presumably run in an endless loop and contain the wget.

View 6 Replies View Related

General :: Write Shell Script That Takes A File Path As Command-line Arguments?

Dec 14, 2010

How can i write a shell script that takes a file path as command-line arguments.and it should report whether the path denotes a file or a directory.

View 2 Replies View Related

General :: Passing An Array As Command Line Arguments?

Apr 2, 2011

how to pass an array as a command line argument in a shell script?

View 5 Replies View Related

General :: Bash : Pass Command Line Arguments Containing Special Characters?

Jul 14, 2010

I've written myself a linux program "program" that does something with a regular expression. I want to call the program in the bash shell and pass that regular expression as a command line argument to the program(there are also other command line arguments). A typical regular expression looks like "[abc]_[x|y]".Unfortunately the characters [, ], and | are special characters in bash. Thus, calling "program [abc]_[x|y] anotheragument" doesn't work. Is there a way to pass the expression by using some sort of escape characters or quotation marks etc.?

(Calling program "[abc]_[x|y] anotheragument" isn't working either, because it interprets the two arguments as one.)

View 7 Replies View Related

General :: Bash: How To Pass Command Line Arguments Containing Special Characters

Jun 24, 2011

I've written myself a linux program "program" that does something with a regular expression. I want to call the program in the bash shell and pass that regular expression as a command line argument to the program (there are also other command line arguments). A typical regular expression looks like "[abc]_[x|y]". Unfortunately the characters [, ], and | are special characters in bash. Thus, calling "program [abc]_[x|y] anotheragument" doesn't work. Is there a way to pass the expression by using some sort of escape characters or quotation marks etc.? (Calling program "[abc]_[x|y] anotheragument" isn't working either, because it interprets the two arguments as one.)

View 8 Replies View Related

General :: Identify File Types - Command Line Arguments - And Count - How Many Of Them Are Regular Files

Feb 20, 2010

Write a script that will take a list of filenames as arguments and output a count of how many of them are regular files, and how many of them are scripts (if the file is executable, it will be assumed to be a script file)

Counts always come back as 0

View 5 Replies View Related

General :: Running An ASP Page From A Shell Script?

Jun 18, 2011

I am trying to access an aspx page which, when accessed with certain parameters in the URL, downloads a file. I need to do this with a shell script, rather than interactively. I tried using wget, but I get a response of 302 from the server, which redirects me to the default page and then downloads the default page html itself. I quickly tried curl which seemed to be doing the same thing. It works perfectly from browsers on either Linux or Windows. Originally, I had a problem with interpretation of ampersands in the URL, but I put quotation marks around the URL, so that isn't the problem now.

I cannot fix this on the server side, because the aspx page will be accessed on a variety of servers which are probably all set differently and which aren't under our control.

View 5 Replies View Related

Programming :: Running A Program With Arguments Using A Shell Script

Jul 14, 2011

Running a program with arguments using a shell script

View 1 Replies View Related

Programming :: Set For A Group Of Command Line Arguments?

Oct 11, 2010

i was wondering if someone could help me figure out a script for global variables i'm trying to set for a group of command line arguments:

basically i'm trying to set: if $# = 3 then i want to search for each all string $1 $2 $3

if $# = 4

then i want to search for each all string $1 $2 $3 $4

View 2 Replies View Related

Programming :: Parsing Command Line Arguments In PHP?

Feb 1, 2010

I want to know how to get eg. the contents of a form on a webpage which has been passed to a server side PHP script, inside for example an array which I can read. I've been reading a ebook on PHP which as far as I can see doesn't cover this inside it.

View 1 Replies View Related

CentOS 5 :: Parport_pc Command Line Arguments Ignored During Bootup?

May 9, 2011

I am having trouble trying to get the kernel to accept some command line arguments for parport_pc during bootup. I have a custom base board with a PC-104 CPU board connected to it through the ISA bus. On the base board I have 3 parallel ports mapped to addresses, 0x150, 0x158, and 0x160. Only the first one needs interrupts, the second two do not. So, on bootup I load the parport_pc module like this modprobe parport_pc io=0x150,0x158,0x160 irq=3,none,none I have been running an older RedHat kernel, 2.6.11 for the past few years and this has been working flawlessly. I had the above modprobe call in /etc/rc.d/rc.local.

Now I am trying to set the system up to use CentOS 5.5, kernel 2.6.18-194.el5. What happens is, the module inserts OK, but the system never recognizes the ports. (i.e, they do not show up in /proc/ioports)
But, if I log into the system, then rmmod parport_pc, then re-modprobe it as above, it works just fine and now my ports are visible. This is an embedded system, expected to just come up and run, so kicking it into action by hand is not an option.

I have tried putting a parport_pc.modules file in /etc/sysconfig/modules so that it will be seen by rc.sysinit, (some site I found while googling said modprobes need to be done earlier than in rc.local),and again, the module gets inserted but the ports are not seen. I have also tried putting rediculously long pauses between each step of the modprobing of the parport stuff;

[Code]...

View 7 Replies View Related

General :: How To Get Source Code Of Web Page From Command Line?

May 6, 2010

I'm trying to get the source code of a web page from linux command line and save it to a file. I googled for it but didn't get any info. I'm not sure if wget can do this.

View 4 Replies View Related

Programming :: Passing Command-line Arguments To Qglviewer Application?

Jul 13, 2009

how to use QGLviewer. I want to give my program a file name as a command line argument. All of the sample programs I find have a main.cpp file like this:

Quote:

#include <QApplication>
#include "window.h"
int main(int argc, char *argv[])

[code]....

Then the Window class, which is derived from QGLViewer, does all the program's actual work. If I want access to argc and argv, for example, to open and read a file that's passed as an argument, what would handle that? Is there a built-in way to get the arg variables to the window class, or do I need to just write a loadfile function and pass them?

View 1 Replies View Related

CentOS 5 Server :: Mysqld Won't Accept Command Line Arguments?

Mar 28, 2009

I have recently installed MySQL Server on my CentOS box.

CentOS 5 MySQL 5.0.45 (installed using 'yum install mysql-server') I can start the daemon without error by issueing the following command: service mysqld start

The problem is that I want to use a number of the command line options available to mysqld, such as --verbose and When I issue '/etc/init.d/mysqld --verbose --help' I get the following output:

[Code]...

View 1 Replies View Related

General :: Scroll One Page At A Time In Linux At The Command Line?

Oct 12, 2010

In windows, you could do a dir | more to scroll one page a time.How does one do this in Linux?

View 2 Replies View Related

OpenSUSE Multimedia :: Using Flash Stream Dumpers - Command Line Arguments

Aug 5, 2010

Has anyone used rtmpdump or flvstreamer? They compile well (there is also a package on Packman for rtmpdump, but not for the latest version) and have man pages listing a bunch of command line arguments, but I have not yet figured out how to use them in connection with browser and flash plugin.

View 1 Replies View Related

Ubuntu :: Unable To Find Any List Of Arguments That Can Be Added In The Command Line

Aug 23, 2010

I am able to start up firefox just fine out of my terminal, but i have not been able to find any list of arguments that can be added in the command line. what i'm looking for is that it starts up in Full Screen mode right off. is there an argument that can be added to ti to do that?

View 2 Replies View Related

Software :: Create A Command Line Inside A Bash Script That Contains Arguments?

Dec 9, 2010

I'm having problems with bash quoting. Maybe someone can tell me what's going on.. Basically, I need to create a command line inside a bash script that contains arguments that contain spaces and bash variables that need to be expanded.

[Code]...

View 5 Replies View Related

Ubuntu Multimedia :: Taking Video Screenshots Using Command Line

Mar 11, 2010

I want to take consecutive screenshots of a video using command line operations but I can't seem to find accurate documentation on different websites.Does anyone know how to do this using vlc, totem or another program?I've used ffmpeg as well, but then reencodes and splits the video file. I just want to take consecutive screenshots.

View 7 Replies View Related

General :: Shell Scripting: Parse Parameters From Command Line?

Mar 12, 2010

myscript [-a a-arg] [-c c-arg] [-b] [-e] somedirectory

Given that I want my shell script be invoked at the command line using the above parameters - where [these brackets] denote that they are optional - what is the best method to parse them?

View 1 Replies View Related

General :: Shell - Connect From Command Line To FTP Server With Proxy?

Aug 15, 2011

I want to connect to an FTP server from the Linux command line. The server is configured behind a proxy.

If I call:

echo $ftp_proxy

I get a result like this:

abc.def.ghi.jkl:8080

If I call:

ftp -pn $ftp_proxy

I get a unknown host error.

How can I connect to the FTP server using the Linux command line?

View 1 Replies View Related

General :: Udp Tcp Command Line Tool For Shell Script Programing

Feb 8, 2011

I am looking for a powerful command line tool to send and receive data via socket I mean define IP , port and data other options for command to send and receive data from sender.(like a high level socket programming)

View 4 Replies View Related

General :: Load A GTK 2.x Theme With Command Line / Shell Script?

Jul 18, 2010

I would like to know how i can load a gtk theme with a terminal command line or with a shell script if possible.

View 14 Replies View Related

General :: Command Line - Get Relative Path From Two Absolute Paths In Shell?

May 13, 2010

We have two paths. First one is directory, second either dir or file.

/a/b/c and /a/d/e.txt

Relative path from first path to second will be: ../../d/e.txt

How to get it in linux terminal?

PS: For those who ask "what is use case?" - creating lots of relative symlinks (just as an example)

View 1 Replies View Related

Ubuntu :: Command Line Mail Taking Too Long To Send; Unable To Qualify Own Domain Name?

Feb 5, 2010

I'm having a problem with my mail. When I send mail, it takes a long time for the send to complete.In the below, datestamp is just a simple script to put in a no-white-space date/time stamp.

Code:
$ datestamp ; mail woodnt; datestamp
02-05-10@193844

[code]....

View 9 Replies View Related

Debian :: Terminal - Commands Not Taking Arguments

Nov 5, 2010

I'm not really new to debian. Just never encountered this before. I'm not even sure how to describe that. The first time I realized something was wrong when I tried to create a file with dd:
root@strych ~# dd if=/dev/zero of=1GFile -bs=10M count=100
dd: bad operand `-bs=10M'

I mean what, I've done that many times before! Then I noticed that some commands started to behave this way:
root@strych ~# ls --help
--help: No such file or directory

On the other hand...
root@strych ~# fish --help
fish - the friendly interactive shell
or
root@strych ~# apt-get --help
apt 0.8.6 dla i386 skompilowany Oct 4 2010 11:55:22
Usage: apt-get [options] command
apt-get [options] install

So what the hell is wrong with my shell? This is persistent with any type of access: both ssh and local (physical), it's the same when I use sh, fish, bash or whatever. It also doesn't matter which user I'm logged in with. I haven't changed .profiles or anything concerning terminal really, besides installing fish but even that was long before I realised this problem. Actually, I can't think of anything that I've done that could do this. What am I missing? The system is debian testing with kernel 2.6.32-5-686.

View 9 Replies View Related

General :: Running Sh Scripts From Csh Command Line?

Apr 21, 2010

i use the csh shell at work. you can either log on to servers locally or to the NFS mount. is is important to know which you are mounted to when executing scripts. csh is the only shell that lets me know which high availability server i am currently on.

before i write a shell script to complete a task, i have to type sh or bash at the prompt, hit enter and then configure the script. then when i am done, hit control -d to get out the bash or sh shell.

is there a way to run sh or bash scripts from the csh command line - i have tried typing this at the csh command line: /bin/sh (or ./bin/bash) while [ 1 ]; do ps auxwww | grep fire | wc -l ; done ... etc, but it does not work.

we do not have the zsh shell at work

View 6 Replies View Related

General :: Running Open Office From The Command Line?

Apr 7, 2011

Yesterday I installed OpenOffice on my Linux server. But when I go to run it through the command line, it says command cannot be found. I've also tried other things like OOWriter, etc. Has anyone had this problem? Installation process went like below: root@aserver [OOO330_m20_native_packed-1_en-US.9567/RPMS]#

rpm -i *.rpm
package openoffice.org-ure-1.7.0-9567.i586 is already installed
package ooobasis3.3-core01-3.3.0-9567.i586 is already installed
package ooobasis3.3-en-US-3.3.0-9567.i586 is already installed
package ooobasis3.3-core02-3.3.0-9567.i586 is already installed

[Code]...

View 2 Replies View Related

General :: Running Script On Ssh Command Line Want To See Output?

Jun 2, 2011

I'm trying to remotely run a script on a target machine though the ssh command-line using passwordless login. I know the keys are set up correctly because if I remove the call to the script, the ssh session succeeds and I can log into the remote machine, but when I call the csh script, I don't get any output on the command line. If I call an identical bash script, I do get the output. Specifically, calling line 1 below just returns me to the command line, but running line 2 echo's hello then returns to the command line (both scripts simply contain a single line to echo hello, and both work when run locally on the remote machine). Why do my csh scripts send any output through the ssh link whereas the bash does?

Code:
1) ssh -i /root/.ssh/id_rsa user@remotemachine /tmp/test.csh

2) ssh -i /root/.ssh/id_rsa user@remotemachine /tmp/test.bash Update: I have further determined that nothing I add to the csh gets run either. I've tried touching files and making directories in the scripts, and all gets run using the bash script, but calling the csh script like line 1 above does nothing, nothing is touched or created.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved