Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Dummie: How do I get variables mid program Post 20859 by thehoghunter on Monday 6th of May 2002 02:07:57 PM
Old 05-06-2002
You are using switch a second time - not what you need. Check out the read command or set a variable and use it instead. Also read the man page on switch so you understand what it is used for. Also, I've not seen 'search' before except in VMS. Check out grep.

case c:
(THIS IS THE BIT IM STUCK ON!!!!!!!!)
echo "enter the required?"
switch ( $< ) (THIS DOESN@T WORK SO HOW CAN I DO IT- when at the prompt search $1 etc works)
search $1 $2 $3 $4 $5 $6 $7 $8 $9
MAIN
breaksw

set dummy=$< instead of switch ($<)
thehoghunter
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Please help this Dummie

I am trying to integrate a Digital Unix Alpha server in a LAN that contains several NT severs. Could someone give me some advise on how to integrate Alpha server, so I can contact the Alpha from any NT and visa versa. Thanks! (1 Reply)
Discussion started by: Rmeyvogel
1 Replies

2. UNIX for Advanced & Expert Users

Dump program variables

Hi, Wish if could provide some clues. How do I dump all the C program variables(global) into say a file with their names and the values. So that when I restart the application again I could use this same file for reinitializing.Is this possible? Thanks, Reji (1 Reply)
Discussion started by: rejise
1 Replies

3. Shell Programming and Scripting

Passing shell variables to awk program..

Hello, Can we pass shell variables like $PATH etc. to a awk program part for example, awk ' { fieldValue=$PATH .... }' file (1 Reply)
Discussion started by: Vishnu
1 Replies

4. Shell Programming and Scripting

How to access the C program variables in shell script

hi I wanted to access the C program variables in shell script. This script is called from the same C program. What are the ways in which i can access variables thankx (3 Replies)
Discussion started by: bhakti
3 Replies

5. Shell Programming and Scripting

dummie ksh

Please help me with a newbie ksh question: I want a script in ksh (under Solaris 8 - SPARC) who runs a "ls -lR" command in some directory and it looks after all the files with the same date as the current one and/or created in the last 24 hours (or N hours). The script should do: - if no... (3 Replies)
Discussion started by: heartwork
3 Replies

6. UNIX for Dummies Questions & Answers

Small Program with variables

Hello Geniuses of the unix world. please help, stupid chemist. I have the following script that I need to create a file. Doesnt make sense unless i explain this way: I need to create a file called summary.in I would like all these lines to be inserted however in the command line I would like the... (1 Reply)
Discussion started by: gingburg
1 Replies

7. UNIX for Dummies Questions & Answers

I'm a dummie!

Hi I was installing 10.04. At 38 minutes remaining it froze and stayed that way for about 2 hours. I shut it down and now It's "frozen" for lack of a better term. ubuntu screen comes up, goes to black screen with blinking cursor. Anyone? Thanks! ---------- Post updated at 08:03 PM ----------... (1 Reply)
Discussion started by: martinnod
1 Replies

8. UNIX for Dummies Questions & Answers

I am not able to use variables in system command in a C program

this method is not working.I am having a problem to use variables in system command. i cannot use the variables in system command. this how i was did system("whereis command"); this method works very fine. but, i want use the commands as variable. that means i want only pass the variables.... (6 Replies)
Discussion started by: dhanda2601
6 Replies

9. UNIX Desktop Questions & Answers

Knowing the size and location of variables in a C program

So I need some help with this. Pardon me if I'm posting in the wrong forum, after some googling for my answer and finding nothing I found this forum. It seemed appropriate for what I was seeking. I just didnt find a forum that concerned the use of GDB. I'm learning to use the C language and GDB.... (2 Replies)
Discussion started by: Cambria
2 Replies

10. Shell Programming and Scripting

Using env variables to run a program

Hi there, I need urgent help with a small program that is run via shell script. Unfortunately I only understand the bare basics of shell scripting and can't figure out how to do this. We have a program that tests the connection between 3 servers. I have a script that lets the program run on... (15 Replies)
Discussion started by: Pherdinand
15 Replies
DH-EXEC-SUBST(1)						      dh-exec							  DH-EXEC-SUBST(1)

NAME
dh-exec-subst - Debhelper executable file substition scripts SYNOPSIS
#! /usr/bin/dh-exec src/libfoo-*.so.* debian/foo-plugins/usr/lib/foo/${DEB_HOST_MULTIARCH}/ DESCRIPTION
Being a sub-command of dh-exec(1), this program must not be ran directly, but through dh-exec, which automatically runs all available sub-commands if run bare; or explicitly with dh-exec --with=subst. It is a wrapper around the various other substitution helpers, and will pipe the input file through all the available substitution helpers. It is up to these scripts to do the actual work. When a helper fails to expand a variable within its input, it will leave it as-is, so that later in the pipeline it can perhaps be expanded by another program. SCRIPTS
dh-exec-subst-env Substitutes any of the available, exported environment variables into its input. It does not do any kind of filtering: whatever is available in the environment, will be available for substitution, however unsafe that may be. dh-exec-subst-multiarch Attempts to expand any of the variables known to dpkg-architecture(1), mostly useful for multi-arch support. The command will query dpkg-architecture(1) directly, and does not rely on environment variables set (as the called program will prefer already set environment variables anyway). ENVIRONMENT
DH_EXEC_SCRIPTDIR Indicates which directory the command-specific scripts should be sought for. If not specified, scripts will be searched for in /usr/share/dh-exec/. FILES
$DH_EXEC_SCRIPTDIR/dh-exec-subst-* The various scripts for the higher-level program. SEE ALSO
debhelper(1), dh-exec(1) AUTHOR
dh-exec-subst is copyright (C) 2011-2012 by Gergely Nagy <algernon@madhouse-project.org>. 2012-05-03 DH-EXEC-SUBST(1)
All times are GMT -4. The time now is 07:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy