Sponsored Content
Full Discussion: Test command
Operating Systems AIX Test command Post 302148647 by bakunin on Monday 3rd of December 2007 05:00:40 AM
Old 12-03-2007
Barry Rosenberg ("Hands-On KornShell93 Programming", Addison-Wesley, 1998) says (p76, Table 6-2):

Quote:
[[ string = pattern ]] or
[[ string == pattern ]]

string equals pattern [...] The single equal sign operator is old-fashioned, but still supported.
I hope this clears things up.

Interestingly the man page for test in AIX 5.3 doesn't refer to any of the string operators.

bakunin
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

the TEST command

Hi everyone, I am new to UNIX and scripting, and I have some problems with the test command. when i try to execute the command: test 20070327.gz > 20070320.gz i try to make a charachter string comparison between the two strings or the two files, to make sure that 20070327.gz is greater than... (2 Replies)
Discussion started by: marwan
2 Replies

2. Shell Programming and Scripting

TEST command

I have been looking into searching various files to display output. The search criteria will be a month and year to output various numbers in the files. is there any way to do this with the TEST function or would it have to be another way? (4 Replies)
Discussion started by: amatuer_lee_3
4 Replies

3. Shell Programming and Scripting

Help with test command

Plese help me on the below query. for j in *.20071231* *.ctl *.dat do ( if then cp "$base/*.*" "$base1" fi ) done My requirement is for all files that has extension *.20071231* *.ctl *.dat should be copied to another folder. But those with caaa.20071231.log... (7 Replies)
Discussion started by: sussane
7 Replies

4. Programming

Test command name

I'm very new to C and could use a little help. I'm testing to make sure the command is running as it's proper name, if not then fail. if (strcmp(argv, "xinit") != 0) { fprintf(stdout, "name = %s length = %d\n",argv,l); usage(0); } This works if the command is... (3 Replies)
Discussion started by: nck
3 Replies

5. UNIX for Dummies Questions & Answers

Test command question

Hi all! I'm new to shell scripting, and I need to do a diff between two dirs. One of them (dir_old) contains many files, and the other (dir_new) contains just a set of 8 files, all starting with MC and extension .CP. The problem I have is that dir_old contains about 20 files that start with... (1 Reply)
Discussion started by: fpp666
1 Replies

6. Shell Programming and Scripting

Test on string containing spacewhile test 1 -eq 1 do read a $a if test $a = quitC then break fi d

This is the code: while test 1 -eq 1 do read a $a if test $a = stop then break fi done I read a command on every loop an execute it. I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test. For example echo hello. Now the... (1 Reply)
Discussion started by: Max89
1 Replies

7. Shell Programming and Scripting

How to check weather a string is like test* or test* ot *test* in if condition

How to check weather a string is like test* or test* ot *test* in if condition (5 Replies)
Discussion started by: johnjerome
5 Replies

8. Shell Programming and Scripting

Test command

hello, i'v trying to use the TEST command and i have some problems with it. i am trying kill all proccess wich is greater than 25. i started with - ps -f | grep -v TTY | awk '{print $4}' but i dont know how to proceed from here.. 10x a lot, Daniel. (11 Replies)
Discussion started by: dadiT
11 Replies

9. Shell Programming and Scripting

TEST Command

Hello, I need help with a test command. Here is what I am trying to do : I've got an interactive script that check if configuration files exist on 2 different directories, then all configuration files are print on screen by a short name. My problem is when you type a "wrong name" or... (12 Replies)
Discussion started by: Aswex
12 Replies

10. Shell Programming and Scripting

Evaluation of test command

Could somebody please explain to me why and how the highlighted line(s) (?) of code puts the "test" evaluation into "result" and then to $enable_static ? Or does not ? I did comment out the original code and changed it to what I feel is less cryptic , but the "result" is still wrong =... (3 Replies)
Discussion started by: anne
3 Replies
Test::Exit(3pm) 					User Contributed Perl Documentation					   Test::Exit(3pm)

NAME
Test::Exit - Test that some code calls exit() without terminating testing VERSION
version 0.03 SYNOPSIS
use Test::More tests => 4; use Test::Exit; exits_ok { exit 1; } "exiting exits" never_exits_ok { print "Hi!"; } "not exiting doesn't exit" exits_zero { exit 0; } "exited with success" exits_nonzero { exit 42; } "exited with failure" DESCRIPTION
Test::Exit provides some simple tools for testing that code does or does not call "exit()", while stopping code that does exit at the point of the "exit()". Currently it does so by means of exceptions, so it will not function properly if the code under test calls "exit()" inside of an "eval" block or string. The only criterion tested is that the supplied code does or does not call "exit()". If the code throws an exception, the exception will be propagated and you will have to call it yourself. "die()"ing is not exiting for the purpose of these tests. exits_ok Tests that the supplied code calls "exit()" at some point. exits_nonzero Tests that the supplied code calls "exit()" with a nonzero value. exits_zero Tests that the supplied code calls "exit()" with a zero (successful) value. never_exits_ok Tests that the supplied code completes without calling "exit()". AUTHOR
Andrew Rodland <andrew@hbslabs.com> COPYRIGHT AND LICENSE
This software is copyright (c) 2009 by HBS Labs, LLC.. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.10.1 2009-12-04 Test::Exit(3pm)
All times are GMT -4. The time now is 09:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy