Sponsored Content
Full Discussion: explanation of test function
Top Forums Shell Programming and Scripting explanation of test function Post 302536910 by kshji on Wednesday 6th of July 2011 12:37:35 PM
Old 07-06-2011
I have written sort test/if some years ago.
 

10 More Discussions You Might Find Interesting

1. Programming

C function to test string or integer

Hi everyone , Is there any predefined C function that tests whether an input is string or an integer? Thank's in advance :) (3 Replies)
Discussion started by: qqq
3 Replies

2. Shell Programming and Scripting

function to test if file is open

I need to write a function that will work in sh/ksh shell that will test to see if a file has already been opened for writting by another user has anyone written something like this? (3 Replies)
Discussion started by: johnsonbryce
3 Replies

3. Programming

C function to test existence of a login

Hi everybody, I need to check in C program whether a given login is known on the system. Is there any system function that could do this ? So far, all I could find is getpwnam(), which answers my problem by parsing the local password database. But won't work if a user is authenticated by... (2 Replies)
Discussion started by: xavier054
2 Replies

4. UNIX for Advanced & Expert Users

test for function name?

Hi, I found this: https://www.unix.com/unix-advanced-expert-users/27318-how-see-function-shell.html which indicates I can use typeset -f to list the functions. But it also lists the contents of the functions. Is there a lighter weight way to see what is defined? Is there an internal... (5 Replies)
Discussion started by: duderonomy
5 Replies

5. 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

6. 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

7. Shell Programming and Scripting

Test function not working

i am writing the following snippet and cannot figure out why the variable measType remains 0. it should be 1 I also tried "\#analog" and '\#analog' in the test statement and it still doesn't work. What is going on? bash$ measType=0 bash$ read line < 2iconfig.ini bash$ echo $line #analog... (4 Replies)
Discussion started by: oahmad
4 Replies

8. UNIX for Dummies Questions & Answers

Explanation on problem "match" function awk

Hello Unix experts, If I could get any explanations on why the code below doesn't work it would be great ! My input looks like that ("|" delimited): Saaaaabbbbbccccc|ok Sdddddfffffggggg|ok The goal is, if $2 is "ok", to remove everything before the pattern given in the match function... (5 Replies)
Discussion started by: lucasvs
5 Replies

9. Shell Programming and Scripting

Wrong test interpretation for simple function.

Hello everyone, I have written simple script below to check if ip is added to interface #!/usr/local/bin/bash IFCONFIG="/sbin/ifconfig" SERVICE="/usr/sbin/service" IP="79.137.X.X" GREP=$(${IFCONFIG} | grep ${IP}) ip_quantity_check () { echo ${GREP} | wc -l } if ];... (2 Replies)
Discussion started by: bryn1u
2 Replies

10. UNIX for Beginners Questions & Answers

Function explanation

dear sir, I am new to unix zone. need some explanation on the function used. cat /apps/prd/venue/code/bin/std.funcs #!/usr/bin/ksh #------------------------------------------------------------------- # printmsg: prints the message given in arg 1 with timestamp to # stdout... (3 Replies)
Discussion started by: gowthamsoft
3 Replies
ATF(7)						       BSD Miscellaneous Information Manual						    ATF(7)

NAME
ATF -- introduction to the Automated Testing Framework DESCRIPTION
IMPORTANT: If you are here because you want to know how to run the tests in /usr/tests, you most likely want to read the tests(7) manual page instead. The Automated Testing Framework (ATF) is a collection of libraries and utilities designed to ease unattended application testing in the hands of developers and end users of a specific piece of software. As regards developers, ATF provides the necessary means to easily create test suites composed of multiple test programs, which in turn are a collection of test cases. It also attempts to simplify the debugging of problems when these test cases detect an error by providing as much information as possible about the failure. As regards users, it simplifies the process of running the test suites and, in special, encourages end users to run them often: they do not need to have source trees around nor any other development tools installed to be able to certify that a given piece of software works on their machine as advertised. If your operating systems distributes ATF, it is possible that it provides an introductory tests(7) manual page. You are encouraged to read it now. License ATF is distributed under the terms of the TNF License, a 2-clause BSD license. For more details please see: /usr/share/doc/atf/COPYING Components ATF is a highly modular piece of software. It provides a couple of libraries to ease the implementation of test programs: one for the C and C++ languages and another one for shell scripts. It also includes multiple small utilities that follow the principle of doing a single thing but doing it right. This section outlines which these components are. Public utilities: atf-check(1) Executes a command and checks that its exit code, its standard output and its standard error output match pre-speci- fied expected values. atf-config(1) Queries static configuration information. atf-report(1) Converts the output of atf-run to user-friendly and/or machine-parseable reports. atf-run(1) Automates the execution of a series of test programs and collects their results in a unified report. atf-sh(1) Shell interpreter for shell-based test programs. Programming interfaces: atf-c-api(3) C programming interface for test programs. atf-c++-api(3) C++ programming interface for test programs. atf-sh-api(3) POSIX shell programming interface for test programs. Other: atf-formats(5) Description of the machine-parseable data formats used by the tools. atf-test-case(4) Generic description of test cases, independent of the language they are implemented in. atf-test-program(1) Common interface provided by the test programs written using the ATF libraries. Recommended reading order For end users wishing to run tests: 1. tests(7) (only if provided by your operating system). 2. atf-test-program(1) 3. atf-run(1) 4. atf-report(1) 5. atf-config(1) For developers wanting to write their own tests: 1. Everything recommended to users. 2. atf-test-case(4) 3. atf-c-api(3) 4. atf-c++-api(3) 5. atf-sh-api(3) 6. atf-sh(1) 7. atf-check(1) For those interested in ATF internals: 1. Everything recommended to users. 2. Everything recommended to developers. 3. atf-formats(5) SEE ALSO
tests(7) HISTORY
ATF started as a Google Summer of Code 2007 project mentored by The NetBSD Foundation. Its original goal was to provide a testing framework for The NetBSD Operating System, but it grew as an independent project because the framework itself did not need to be tied to a specific operating system. For more details on this subject, please see: /usr/share/doc/atf/NEWS /usr/share/doc/atf/ROADMAP AUTHORS
For more details on the people that made ATF possible, please see: /usr/share/doc/atf/AUTHORS BSD
August 28, 2010 BSD
All times are GMT -4. The time now is 09:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy