Sponsored Content
Full Discussion: conditional
Top Forums UNIX for Dummies Questions & Answers conditional Post 302240061 by vidyadhar85 on Thursday 25th of September 2008 02:00:06 AM
Old 09-25-2008
use
Quote:
${#variablename}
to get its length
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Awk Conditional

Hi Guys, i have this files: xyz20080716.log opqrs20080716.log abcdef20080716.log xyz20080717.log oprs20080717.log abcde20080717.log currentdate: 20080717.log I want to make script to zip the file for past day. Can anyone help for this? i've just learn awk scripting & still confused with... (3 Replies)
Discussion started by: icy_blu_blu
3 Replies

2. UNIX for Dummies Questions & Answers

If conditional

Hi, I am new to unix and shell scripting.In my script,there is a line using the "if" conditional - if && ; then do something Here "x" is a variable holding string value.If it is not equal to a comma or a string,only then I want to enter the "if" loop. But I am getting error while... (1 Reply)
Discussion started by: abhinavsinha
1 Replies

3. Shell Programming and Scripting

If conditional

Hi, I am new to unix and shell scripting.In my script,there is a line using the "if" conditional - if && ; then do something Here "x" is a variable holding string value.If it is not equal to a comma or a string,only then I want to enter the "if" loop. But I am getting error while... (12 Replies)
Discussion started by: abhinavsinha
12 Replies

4. Shell Programming and Scripting

conditional extracting

Hi, I need to extract lines based on some conditions as explained below: File format details: 1. each set starts with AAA only 2. number of columns is fixed 3. number of rows per set may vary (as one set is upto DDD - 4 rows) Now, i need to extract only the lines starting with AAA and... (2 Replies)
Discussion started by: prvnrk
2 Replies

5. Shell Programming and Scripting

conditional statement

Hi all, The following code is to find if a list of numbers from one file are within the range in another file. awk -F, '\ BEGIN { while ((getline < "file2") > 0) file2=$3 } {for (col1 in file2) if ($0>=30 && $1<=45) print $0} ' FILE1 But where I have the number 30 and 45, I... (3 Replies)
Discussion started by: dr_sabz
3 Replies

6. Shell Programming and Scripting

conditional confusion

Hell Unix.com Community: I am working on a personal project using yad v0.12.4 (zenity fork) and have hit a wall on how to show a progress bar while my function is processing. I have been all over the ABS Guide, googled 21 Linux-specific sites that I revere. I even asked on the yad-common... (4 Replies)
Discussion started by: Habitual
4 Replies

7. Shell Programming and Scripting

Conditional awk

Hello All, I have a file like this: bash-3.00$ cat 1.txt 201112091147|0|1359331220|1025 201112091147|0|1359331088|1024 201112091144|0|1359331172|1025 201112091147|0|1359331220|1021 201112091149|0|1359331088|1027 201112091144|0|1359331172|1029 and a list of MSISDNs in another file... (9 Replies)
Discussion started by: EAGL€
9 Replies

8. Shell Programming and Scripting

Conditional execution

Here's an interesting (to me, anyway) little puzzle. Background: I have a process that restores a number of large(ish) files from tape backup. As an individual file is being written, it is owned by root, then the ownership is changed when that file is complete. Since this process can take... (3 Replies)
Discussion started by: edstevens
3 Replies

9. UNIX for Dummies Questions & Answers

Conditional Script

Hi, I have a script file which has some simple commands. I want these commands to be executed based on the input. Ia m good with IF statement also. At the end it has to be based on incoming value. Example CASE 1 : Execute some commands where Input value as 1 CASE 2 : Execute... (5 Replies)
Discussion started by: vrupatel
5 Replies

10. Shell Programming and Scripting

Conditional OR in shell

Hi I have been trying to write a simple code: if ] || ] then echo "Log Directory is not empty, we will continue with archive operation" else echo "Log Directory is empty, Exiting......." exit 1 fi It never checks for the second OR condition i.e. ] Could you please help? Thanks (8 Replies)
Discussion started by: ankur328
8 Replies
Devel::Cover::Truth_Table(3pm)				User Contributed Perl Documentation			    Devel::Cover::Truth_Table(3pm)

NAME
Devel::Cover::Truth_Table - Create and manipulate truth tables for coverage objects. VERSION
version 0.89 SYNOPSIS
use Devel::Cover::Truth_Table; # $a || $b my $or_tt = Devel::Cover::Truth_Table->new_primitive('or_3', 0, 1, 1); # $c && $d my $and_tt = Devel::Cover::Truth_Table->new_primitive('and_3', 1, 0, 1); # merge contents of $and_tt into right column of $or_tt, to create # $a || ($c && $d) $or_tt->right_merge($and_tt); # get a (sorted) textual representation my @text = $or_tt->sort->text; print "$_ " foreach @text; __END__ A B C |exp|hit -------------- 0 0 X | 0 |--- 0 1 0 | 0 |--- 0 1 1 | 1 |+++ 1 X X | 1 |+++ -------------- DESCRIPTION
This module provides methods for creating and merging conditional primitives ("$a && $b", "$c || $d", etc.) into more complex composite expressions. METHODS
new_primitive($op, @coverage) Create a new truth table based on one of the built-in primitives, which are the subclasses of Devel::Cover::DB::Condition. $op is one of the following: and_3 "and" or "&&" with three conditional paths. or_3 "or" or "||" with three conditional paths. or_2 "or" or "||" with two conditional paths. (i.e., when the right hand side of the expression is a constant) xor_4 "xor" with four conditional paths. @coverage is a list booleans identifying which of the possible paths have been covered. sort() Sorts a truth table (in place) and returns the sorted object. text() Format a truth table to an array of strings for printing. html() Format a truth table in HTML. error() percentage() Determines the proportion of possible conditions that have coverage. right_merge($sub_table) Merge entries from $sub_table into right column of table. left_merge($sub_table) Merge entries from $sub_table into left column of table. SEE ALSO
Devel::Cover BUGS
None that I'm aware of... LICENSE
Copyright 2002 Michael Carman <mjcarman@mchsi.com> This software is free. It is licensed under the same terms as Perl itself. The latest version should be available from: http://www.pjcj.net perl v5.14.2 2012-06-16 Devel::Cover::Truth_Table(3pm)
All times are GMT -4. The time now is 05:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy