Sponsored Content
Top Forums Shell Programming and Scripting Shell Script to launch C program Post 302408190 by gazmcc182 on Sunday 28th of March 2010 03:45:55 PM
Old 03-28-2010
thanks for the reply. yes this is what i am trying to do. for the script to allow the user to define the file they wish to watch, then the script takes it in, and loads the monitor with their selected file. iv implemented your code and im getting an error message. this is a section of my code so far:

Code:
echo "please enter the file you wish to monitor";
read fname;
while true; do
read -p "are you sure you want to monitor the file: $fname?" yn

case $yn in
      [Yy]*) if [ -d $fname]; then 
           for i in $fname/*; do
               ./desktop/monitor $fname &
           done
       fi;;

[Nn]* ) exit;;


the error message im gettin is [: missing `]'
its from the line:

Code:
[Yy]*) if [ -d $fname]; then


thank you so much for your help redhead
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to launch program though telnet

I have launched telnet on nt and have connected to a unix server, I'm trying to run a program on the unix server which will launch a gui, but when I try to launch it I get the message "display not set\n" "By default set it to 0.0" I can sit down at the unix machine and launch the program with... (3 Replies)
Discussion started by: cbachman
3 Replies

2. Programming

launch an executable from a C++ program

Hi everybody! Could you please tell me how can I launch an executable from a C++ (on unix) program? thanks in advance! (2 Replies)
Discussion started by: nadiamihu
2 Replies

3. Shell Programming and Scripting

How to launch a Csh shell script using Excel Macro ?

Hi all. I need to use excel macro at my desktop to launch a csh script which is in a solaris environment. What is the code that i can use in macro to help me with that ? Basically, the code need to telnet or ftp to the solaris environment and just run the script and the macro will output in an... (1 Reply)
Discussion started by: Raynon
1 Replies

4. UNIX for Advanced & Expert Users

Can we launch a shell script automatically upon ssh login?

Greetings all, I'll just like to know if it is possible to launch a shell script automatically upon a user's successful login into ssh from a remote host, without adding a command parameter to the ssh command... ie. after keying in ssh username@host (not ssh username@host "command") and upon... (1 Reply)
Discussion started by: rockysfr
1 Replies

5. Programming

Problem with external program launch

Hello, in the application i'm writing i need to launch "recordmydesktop" to capture the screen,but i'm having a problem: when the recording stops,and the encoding of the saved file starts,the entire system hangs until the completion of the encoding.This happens if i launch recordmydesktop from my... (7 Replies)
Discussion started by: Zipi
7 Replies

6. Shell Programming and Scripting

launch vnc session from unix shell script

Hi All, OS:AIX 64 bits Would like to know what is the command to launch vnc session from unix shell script so that Reports server is started from vnc session which should be launched from within the shell script. Thanks for your time! Regards, (0 Replies)
Discussion started by: a1_win
0 Replies

7. Shell Programming and Scripting

Launch a windows program from perl script

Hi i wanted to know if any one can give me an example on how to launch a windows program in a perl script. I wanted to open the nmap software on my computer with a perl script, i heard this can be done with the system function. Would the function be in this format: $text =... (1 Reply)
Discussion started by: kingbp
1 Replies

8. Shell Programming and Scripting

Perl script timer on program launch

So I am attempting to get a short but complex perl script to be able to time out an application that I will launch from a command line. The terminal I use is MKS C SHELL and I am having trouble doing the a job spawn that will launch the application and keep time on it. I know you could do this... (1 Reply)
Discussion started by: vas28r13
1 Replies

9. UNIX for Dummies Questions & Answers

Launch shell script if string match is found

I'm trying to write a simple shell script that looks at a given text file and if the only word in the file is 'completed', it launches another shell script. So far I have this almost working... if grep 'completed' $datafile then... however, using this logic the secondary shell script... (3 Replies)
Discussion started by: MickeyGreen
3 Replies

10. Shell Programming and Scripting

Launch shell script with parameters from a webpage button

I want to create a simple html page that should contain 2 fields in which the user can write the input. Then I want to have a button that should launch a shell script with the parameters inserted by user in the fields from the webpage. This is the code behind my webpage: <html> <form... (2 Replies)
Discussion started by: black_fender
2 Replies
clm residue(1)							  USER COMMANDS 						    clm residue(1)

  NAME
      clm residue - extend clustering of subgraph to clustering of graph.

      clmresidue  is  not  in  actual fact a program. This manual page documents the behaviour and options of the clm program when invoked in mode
      residue. The options -h, --apropos, --version, -set, --nop are accessible in all clm modes. They are described in the clm manual page.

  SYNOPSIS
      clm residue -icl fname (input clustering) -imx fname (input graph) [-rpm fname (residue projection matrix)]  [-o	fname  (output	clustering
      file)]

  DESCRIPTION
      The cluster file presumably contains a clustering of a subgraph of the graph G contained by the matrix file, implying that the row domain of
      that clustering is a subset of the node domain of the graph. clm residue will compute  a	simple	upwards  projection  of  that  clustering,
      resulting in a clustering of G.

  OPTIONS
      -imx fname (input graph)

      -icl fname (input clustering)

      -rpm fname (residue projection matrix)
	The name for the file in which the residue projection matrix is stored.  It contains for each node and for each cluster in the input clus-
	tering the combined weight of the (edges to the) neighbours of that node in that cluster.  The default output file name is out.rpm.

      -o fname (output clustering file)
	The name for the file in which the majority vote projection clustering is stored. Aka the majority vote projection clustering storage file
	name.

	This  embodies	a very crude approach to distributing the missing nodes in the input clustering onto that same cluster. For each node, the
	cluster is taken for which the residue projection is the largest (see above). The residue (i.e. the set of  missing  nodes)  is  initially
	viewed	as  a  cluster;  the set of nodes for which the projection is largest for the residue itself will form a new cluster, if it is not
	empty.

	By default output is sent to STDOUT.

  AUTHOR
      Stijn van Dongen.

  SEE ALSO
      mclfamily(7) for an overview of all the documentation and the utilities in the mcl family.

  clm residue 12-068						      8 Mar 2012						      clm residue(1)
All times are GMT -4. The time now is 02:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy