Sponsored Content
Full Discussion: shell test command
Top Forums Shell Programming and Scripting shell test command Post 302269920 by foottuns on Friday 19th of December 2008 05:32:22 AM
Old 12-19-2008
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..
 

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

Test command

Hello, I am trying to add some tests to existing code. The code already contains some test commands. An example is as follows... ] then Does anyone know the purpose of the double equals? I would have used a single equals sign... (2 Replies)
Discussion started by: JWilliams
2 Replies

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

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

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

6. UNIX for Dummies Questions & Answers

How do i tell my bash shell script to test the output of a command against something

How do i tell my bash shell script to test the output of the command i'm using?? I want this script to look for lines not equal to 1 then let me know.. $ cat blah ; echo ---- ; cat blah.sh 1 fe 1 fi 1 fo 0 fum 1 blahda 1 blah 0 blahh 1 bla 1 bl 1 blahhh ---- #!/bin/bash while... (1 Reply)
Discussion started by: phpfreak
1 Replies

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

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

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

10. 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
logcheck-test(1)					      General Commands Manual						  logcheck-test(1)

NAME
logcheck-test - test new logcheck rules easily SYNOPSIS
logcheck-test [-q|-i] [-a|-s|-l FILE] [-e] [-P PREFIX] [-S SUFFIX] RULE logcheck-test [-q|-i] [-a|-s|-l FILE] -r RULEFILE DESCRIPTION
logcheck-test parses a log file for matching lines specified by a single rule or a rule file. If using a single RULE you can set a PREFIX and a SUFFIX to write new rules easily. OPTIONS
-h, --help Show usage information -a, --auth.log Parse /var/log/auth.log for matching lines -s, --syslog Parse /var/log/syslog for matching lines -l, --log-file FILE Parse FILE for matching lines -i, --invert-match Show line that don't match the RULE or the RULEFILE -q, --quiet Suppress rule summary at the end of output -e, --surround-rule Surround RULE with standard prefix and suffix: ^[[:alpha:]]{3} [ :[:digit:]]{11} [._[:alnum:]-]+ RULE$ -P, --append-prefix PREFIX Append PREFIX to rule prefix. Option can be given multiple times -S, --prepend-suffix SUFFIX Prepend SUFFIX to rule suffix. Option can be given multiple times -r, --rule-file RULEFILE Use file RULEFILE for rule input EXAMPLES
With logcheck-test you can easily write and test new rules. Test a single rule against /var/log/syslog: logcheck-test -s "RULE" Test a single rule against ~/log, surround the rule with standard prefix and suffix and append "kernel " to prefix: logcheck-test -l ~/log -e -P "kernel " "RULE" Test the rules in rulefiles/linux/ignore.d.server/kernel against ~/log: logcheck-test -l ~/log -r rulefiles/linux/ignore.d.server/kernel Test which lines the rules in rulefiles/linux/ignore.d.server/kernel doesn't match: logcheck-test -l ~/log -r rulefiles/linux/ignore.d.server/kernel -i EXIT STATUS
On successful matching logcheck-test will complete with exit code 0. An exit code of 1 indicates no successful matching. An exit code greater then 1 indicates an error occurred. Textual errors are written to the standard error stream. SEE ALSO
logcheck(8) AUTHOR
logcheck is developed by Debian logcheck Team at alioth: http://alioth.debian.org/projects/logcheck/. This manual was written by Hannes von Haugwitz <hannes@vonhaugwitz.com>. Feb 19, 2010 logcheck-test(1)
All times are GMT -4. The time now is 08:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy