Sponsored Content
Top Forums Shell Programming and Scripting Can I do this without eval? (zsh) Post 302990293 by Corona688 on Tuesday 24th of January 2017 11:54:29 AM
Old 01-24-2017
So this takes a single $op, such as "-z", and a single $arg, which is supposed to be a literal value? Feed them into the test external to test them outside the shell:

Code:
if test "$op" "$arg"
then
...
fi

test won't support the full extended zsh syntax, just the basic bourne. It won't evaluate any shell code or variables whatsoever and will never make your program quit from syntax error. If someone tries inserting multiple things into $op to be tricky, it just won't work.
These 2 Users Gave Thanks to Corona688 For This Post:
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

tutorials about zsh

hi there I'm looking for tutorials about zsh (beginners to experts) can you give me addresses please? thx a lot (3 Replies)
Discussion started by: SpY974
3 Replies

2. UNIX for Dummies Questions & Answers

Z-shell (zsh)

Z-shell (zsh) anyone use it and how do ya like it? (1 Reply)
Discussion started by: Bodhi
1 Replies

3. UNIX for Dummies Questions & Answers

question about zsh

hi, In bash, $ bind -P | grep yank-last yank-last-arg can be found on "\M-.", "\M-_". this allows me to press ALT key and the period (.) to yank the last argument of the previous command line into the current command line. How can I get the same behavior in zsh ? Thanks ... (0 Replies)
Discussion started by: Andrewkl
0 Replies

4. Shell Programming and Scripting

Using zsh

Hi all i am forced to use tcsh at work but i want to use zsh, so i have added this to my .cshrc if (! $?STARTTCSH) then if ("$tty" != "" && -x /bin/zsh) exec /bin/zsh exit endif but this now stopped me going back to tcsh if i need to, is there a way to do this, i would... (7 Replies)
Discussion started by: ab52
7 Replies

5. Shell Programming and Scripting

Strange result of eval, how does eval really work with ssh?

Hi all, some small script with eval turned me to crazy. my OS is linux Linux s10-1310 2.6.16.53-0.8.PTF.434477.3.TDC.0-smp #1 SMP Fri Aug 31 06:07:27 PDT 2007 x86_64 x86_64 x86_64 GNU/Linux below script works well #!/bin/bash eval ssh remotehost date eval ssh remotehost ls below... (1 Reply)
Discussion started by: summer_cherry
1 Replies

6. Shell Programming and Scripting

Error in eval eval command to print html tags

anyone has any info on why this is complaining??? vivek@vivek-c5e55ef2e ~/TAC $ zoneCounter=1 vivek@vivek-c5e55ef2e ~/TAC $ optUsage1=23% vivek@vivek-c5e55ef2e ~/TAC $ eval eval echo "<th>Zone $zoneCounter </th><th align=\"left\"> \$optUsage$zoneCounter </th>" -bash: syntax error... (1 Reply)
Discussion started by: vivek d r
1 Replies

7. Shell Programming and Scripting

Error in eval eval command to print html tags

anyone has any info on why this is complaining??? vivek@vivek-c5e55ef2e ~/TAC $ zoneCounter=1 vivek@vivek-c5e55ef2e ~/TAC $ optUsage1=23% vivek@vivek-c5e55ef2e ~/TAC $ eval eval echo "<th>Zone $zoneCounter </th><th align=\"left\"> \$optUsage$zoneCounter </th>" -bash: syntax error... (13 Replies)
Discussion started by: vivek d r
13 Replies

8. Shell Programming and Scripting

Zsh array -a vs. -A question

Inside a zsh function, I create a local array with local -a arrayname and a local associative array with local -A arrayname. I also can create an array using set, like this: set -A arrayname value1 value2 value3In this form, I can not explicitly declare that an array is associative or... (2 Replies)
Discussion started by: rovf
2 Replies
aetest(5)																 aetest(5)

NAME
aetest - aegis test results file format DESCRIPTION
The default configuration of the test_command and development_test_command commands of the project config file (see aepconf(5) for more information) is for the test commands to test a single test file and a single architecture at a time. On some systems, this is not effi- cient. When configured to run multiple simultaneous tests, or multiple simultaneous architectures, a file of the format described here is used to communicate the test results back to Aegis. CONTENTS
Use a separate row for each unique filename and architecture combination. test_result = [ { ... } ]; All the fields are mandatory. file_name = string; This is the name of the file being tested. Use the same filename as was given to the test command. exit_status = integer; This is the exit status returned by the test. architecture = string; This is the architecture which the test was run on. Defaults to the architecture of the current system if not set. (Try to avoid setting this field unless you have a very clever multi-architecture test system.) SEE ALSO
aet(1) run tests aegis(5) aegis file format syntax aepconf(5) Project configuration file format. COPYRIGHT
aegis version 4.24.3.D001 Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Peter Miller The aegis program comes with ABSOLUTELY NO WARRANTY; for details use the 'aegis -VERSion License' command. This is free software and you are welcome to redistribute it under certain conditions; for details use the 'aegis -VERSion License' command. AUTHOR
Peter Miller E-Mail: millerp@canb.auug.org.au //* WWW: http://www.canb.auug.org.au/~millerp/ Reference Manual Aegis aetest(5)
All times are GMT -4. The time now is 04:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy