Sponsored Content
Full Discussion: Test....
Top Forums UNIX for Dummies Questions & Answers Test.... Post 302165742 by Kaminski on Friday 8th of February 2008 04:15:11 PM
Old 02-08-2008
Test....

hi! it's possible to test if a user exist or not? does exist something like -d for directories? i thought i could use getenv but i don't know how to use it for this purpose...

how can i verify if a variable is a number and not a generic string? i can't use regex, since i'm using bash shell Smilie

thanks
 

5 More Discussions You Might Find Interesting

1. Solaris

test and .test in same directory

i am using solaris 5.10. i can create two different files "test" and ".test" in the same directory. now suppose i want to change the attribute of the hidden file .test to visible is it possible??? since "." is just an attribute to mark a file hidden why is unix allows creation of "file" and... (14 Replies)
Discussion started by: vikashtulsiyan
14 Replies

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

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

4. Shell Programming and Scripting

Prefixing test case methods with letter 'test'

Hi, I have a Python unit test cases source code file which contains more than a hundred test case methods. In that, some of the test case methods already have prefix 'test' where as some of them do not have. Now, I need to add the string 'test' (case-sensitive) as a prefix to those of the... (5 Replies)
Discussion started by: royalibrahim
5 Replies

5. Shell Programming and Scripting

Shc : trying to test functionality "test" compiling but can not execute

I am testing shc to see if it would help with my need. Im at a point where Im trying to compile and test the "test.ksh" file that comes in the tar ball : shc-3.8.9> shc -v -r -f test.ksh shc shll=ksh shc =-c shc =exec '%s' "$@" shc = shc opts= shc: cc test.ksh.x.c -o test.ksh.x... (7 Replies)
Discussion started by: popeye
7 Replies
Test::Dir(3pm)						User Contributed Perl Documentation					    Test::Dir(3pm)

NAME
Test::Dir - test directory attributes SYNOPSIS
use Test::More ...; use Test::Dir; DESCRIPTION
This modules provides a collection of test utilities for directory attributes. Use it in combination with Test::More in your test programs. FUNCTIONS
dir_exists_ok(DIRNAME [, TESTNAME] ) Ok if the directory exists, and not ok otherwise. dir_not_exists_ok(DIRNAME [, TESTNAME] ) Ok if the directory does not exist, and not ok otherwise. dir_empty_ok(DIRNAME [, TESTNAME] ) Ok if the directory is empty (contains no files or subdirectories), and not ok otherwise. dir_not_empty_ok(DIRNAME [, TESTNAME] ) Ok if the directory is not empty, and not ok otherwise. dir_readable_ok(DIRNAME [, TESTNAME] ) Ok if the directory is readable, and not ok otherwise. dir_not_readable_ok(DIRNAME [, TESTNAME] ) Ok if the directory is not readable, and not ok otherwise. dir_writable_ok(DIRNAME [, TESTNAME] ) Ok if the directory is writable, and not ok otherwise. dir_not_writable_ok(DIRNAME [, TESTNAME] ) Ok if the directory is not writable, and not ok otherwise. dir_executable_ok(DIRNAME [, TESTNAME] ) Ok if the directory is executable, and not ok otherwise. dir_not_executable_ok(DIRNAME [, TESTNAME] ) Ok if the directory is not executable, and not ok otherwise. TO DO
I know there are a lot more directory attributes that can be tested. If you need them, please ask (or better yet, contribute code!). AUTHOR
Martin 'Kingpin' Thurn, "mthurn at cpan.org", <http://tinyurl.com/nn67z>. BUGS
Please report any bugs or feature requests to "bug-test-dir at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Dir>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT
You can find documentation for this module with the perldoc command. perldoc Test::Dir You can also look for information at: o RT: CPAN's request tracker <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Dir> o AnnoCPAN: Annotated CPAN documentation <http://annocpan.org/dist/Test-Dir> o CPAN Ratings <http://cpanratings.perl.org/d/Test-Dir> o Search CPAN <http://search.cpan.org/dist/Test-Dir> ACKNOWLEDGEMENTS
COPYRIGHT &; LICENSE Copyright (C) 2007-2008 Martin 'Kingpin' Thurn This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2011-03-05 Test::Dir(3pm)
All times are GMT -4. The time now is 12:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy