shell test command | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

shell test command

Shell Programming and Scripting


Tags
shell script, shell scripting, unix scripting, unix scripting basics

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 12-19-2008
foottuns foottuns is offline
Registered User
 
Join Date: Dec 2008
Last Activity: 5 February 2009, 9:13 PM EST
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
shell test command

I have a shell script, what i want to do is to use the test command and test it, but to be honest with you i really don't know,

can someone give me some advices and how to use it?

I have looked on the internet and saw some commands and scripts but the thing is where to start.....to test it.....

best regards dan,
Sponsored Links
    #2  
Old 12-19-2008
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
code tag tagger
 
Join Date: Sep 2007
Last Activity: 25 November 2014, 8:27 AM EST
Location: St. Gallen, Switzerland
Posts: 6,244
Thanks: 124
Thanked 453 Times in 412 Posts
Couldn't describe it better:
Test Constructs
Sponsored Links
    #3  
Old 12-19-2008
foottuns foottuns is offline
Registered User
 
Join Date: Dec 2008
Last Activity: 5 February 2009, 9:13 PM EST
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Here is my code and I want to test it, where to start, cause I don't even know what to test to be honest with you...





Code:
for personal reasons i have remove this code and also i want to thank zaxxon for his help....


Last edited by foottuns; 12-19-2008 at 09:42 AM..
    #4  
Old 12-19-2008
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
code tag tagger
 
Join Date: Sep 2007
Last Activity: 25 November 2014, 8:27 AM EST
Location: St. Gallen, Switzerland
Posts: 6,244
Thanks: 124
Thanked 453 Times in 412 Posts
test is no program to test if your shell script works. test is used with or without "if" for example, to test if a condition is true or not, to implement a logical flow into scripts. In your script, that smells like homework/classroom stuff, are some loads of "if" tests already. Best talk to your teacher again and tell him that your task is not clear to you.

By the rules of this forum, homework/classroom stuff is forbidden:

(6) Do not post classroom or homework problems.

which you can read here:

The UNIX and Linux Forums - Forum Rules
Sponsored Links
    #5  
Old 12-19-2008
elledante elledante is offline
Registered User
 
Join Date: Dec 2008
Last Activity: 19 December 2008, 9:29 AM EST
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
have you tried running the program using the ./filename it usually comes up with errors like mine has at the moment haha
Sponsored Links
    #6  
Old 12-19-2008
foottuns foottuns is offline
Registered User
 
Join Date: Dec 2008
Last Activity: 5 February 2009, 9:13 PM EST
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
ok, thanks a lot, i will remove this from here, any way now i do understand what you was want to say, it did help me in a way.... the thing is i have a script file which record everything what i did and test everything and the script works very well, and when it didn't i had errors which i fix them up. thank you very much for your help
Sponsored Links
    #7  
Old 12-19-2008
foottuns foottuns is offline
Registered User
 
Join Date: Dec 2008
Last Activity: 5 February 2009, 9:13 PM EST
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
yes i did, and all the time when i had errors i fix them up, any way thanks for your help guys....
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
TEST command amatuer_lee_3 Shell Programming and Scripting 4 05-09-2008 08:36 AM
Test command JWilliams AIX 2 12-04-2007 02:53 AM
test command looks strange... jjinno Shell Programming and Scripting 2 11-02-2007 08:31 PM
the TEST command marwan UNIX for Dummies Questions & Answers 2 04-23-2007 07:51 PM
test command is not working zam Shell Programming and Scripting 2 07-04-2006 10:42 PM



All times are GMT -4. The time now is 02:21 AM.