How to expand > 1 unix command?

How to expand > 1 unix command?

Post by Alan Jurgense » Thu, 01 Jan 1998 04:00:00



hiya,

I want to set an environment variable to contain more than one command,
then have the shell expand these commands and execute them. it wont!
help!


return'"

$SPIENV                                                
unset TERMCAP ; echo 'press enter to return'

ksh: ;: This is not an identifier.

--
          +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
                 Alan W. Jurgensen  -  Full Compass Systems

          +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+

 
 
 

How to expand > 1 unix command?

Post by Blaine Owen » Thu, 01 Jan 1998 04:00:00


Suggestion - use "alias" instead:

alias SPIENV='unset TERMCAP ; echo "press enter to return"'

invoke it with "SPIENV" (no $). If you want to undo it - "unalias SPIENV"
--
Blaine Owens



> hiya,

> I want to set an environment variable to contain more than one command,
> then have the shell expand these commands and execute them. it wont!
> help!


> return'"

> $SPIENV                                                
> unset TERMCAP ; echo 'press enter to return'

> ksh: ;: This is not an identifier.

> --
>           +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
>                  Alan W. Jurgensen  -  Full Compass Systems

>           +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+


 
 
 

How to expand > 1 unix command?

Post by Michael Kel » Thu, 01 Jan 1998 04:00:00




>hiya,

>I want to set an environment variable to contain more than one command,
>then have the shell expand these commands and execute them. it wont!
>help!


>return'"

>$SPIENV                                                
>unset TERMCAP ; echo 'press enter to return'

>ksh: ;: This is not an identifier.

I don't know what you're doing but if it's just to do multiple
commands on the command line then you might look into
using an alias instead of an environment variable.

Mike

"Genius gives birth, talent delivers."

                - Jack Kerouac

 
 
 

How to expand > 1 unix command?

Post by Jon LaBad » Thu, 08 Jan 1998 04:00:00



|>
|> >hiya,
|> >
|> >I want to set an environment variable to contain more than one command,
|> >then have the shell expand these commands and execute them. it wont!
|> >help!
|> >

|> >return'"

|> >$SPIENV                                                
|> >unset TERMCAP ; echo 'press enter to return'

|> >ksh: ;: This is not an identifier.
|>
|> I don't know what you're doing but if it's just to do multiple
|> commands on the command line then you might look into
|> using an alias instead of an environment variable.

Check out eval, as in:

    $ eval $SPIENV.

jl
--


 4455 Province Line Road        (609) 252-0159
 Princeton, NJ  08540-4322      (609) 683-7220 (fax)

 
 
 

1. Wanted: <><><> Unix Specialist <><><>

PERMANENT, FULL-TIME, POSITION.

Attractive Palm Beach County, Florida Location.    MAJOR EMPLOYER.

<><><>  UNIX SPECIALIST <><><>

-- AIX, SCO Preferred
-- Programming Background Preferred
-- Knowledge of INFORMIX  a real plus

FOR CONFIDENTIAL CONSIDERATION, PLEASE CONTACT:
(resumes..in .txt format please..before calls...please)

Richard
ENTERPRISE SOFTWARE STRATEGIES, INC.

Toll-free Voice: 1-800-624-2944
Toll-free Fax:   1-800-470-3751
Voice:            1-561-998-2823
Fax:              1-561-995-0699


2. Boot and lock-up

3. return status of commands run in su - <name> -c "<command>"

4. term110 no longer runs on HPUX 7.0 (107 did)

5. Are there any command-line alternatives to the <ctrl> <alt> <+> ?

6. Printing Problems

7. rsh <hostname> -n -l <user> <command> hangs on Solaris 8

8. X-window, VC,etc

9. >>>Compiling 2.0 problem: "asm86: Command not found" <<<

10. UNIX -> MSDOS -> UNIX File transfers

11. please help, problem with Unix --> NT--> Unix

12. COMPUTERWORLD: HP from Unix -> NT -> Unix

13. >>PW:C/C++ UNIX ANALYST/PROGRAMMER: Unix, Sun, Solaris 2.x, C/C++