Sponsored Content
Full Discussion: If conditional
Top Forums Shell Programming and Scripting If conditional Post 302253166 by muruganksk on Friday 31st of October 2008 05:41:12 AM
Old 10-31-2008
code:

You can use the sed ( stream editor) to do this.. Please see the below example so that you can eliminate the starting commas.

$echo ",,,checking" | sed 's/,/ /g'
$ checking

The output will have spaces in front of "checking". To eliminate the space you have to use.


$echo ",,,checking" | sed 's/,//g'
$checking


$echo ",,,checking," | sed 's/^,*//'
$checking


Now you can verify.
 

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

conditional

conditional is not wworking can any one figure out what goes wrong xx1=`$ORACLE_HOME/bin/sqlplus -s apps/ostgapps1 2>/dev/null << EOF WHENEVER SQLERROR EXIT 1 set head off feedback off ; WHENEVER SQLERROR EXIT SQL.SQLCODE; select count(*) from CMS_INVOICE_ALL... (2 Replies)
Discussion started by: u263066
2 Replies

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

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
DTCK(1p)						User Contributed Perl Documentation						  DTCK(1p)

NAME
dtck - Check the DNSSEC-Tools data files for sanity. SYNOPSIS
dtck [options] [dtck_config_file] DESCRIPTION
dtck checks DNSSEC-Tools data files to determine if the entries are valid. dtck checks the validity of DNSSEC-Tools configuration files, rollrec files, and keyrec files. It does not perform the file checking itself, but runs checking programs specific to each type of data file. A dtck configuration file is consulted to determine the files to check. This file lists the DNSSEC-Tools data files and their types. If a dtck configuration file is not given on the command line, dtck will only check the DNSSEC-Tools configuration file. This is equivalent to running dtconfchk directly. DTCK CONFIGURATION FILE
A dtck configuration file contains a list of the files to be checked by dtck. Except for comments, each line has the following format: keyword file directory keyword is one of "config", "rollrec", or "keyrec". file is the pathname of the file to be checked. directory is the name of the directory that holds file and is optional. The dtck configuration file contains the following types of records: config These lines define the DNSSEC-Tools configuration files that will be checked. The dtconfchk program will be used to verify these files. rollrec These lines define the rollrec files that will be checked. The rollchk program will be used to verify these files. keyrec These lines define the keyrec files that will be checked. The krfcheck program will be used to verify these files. comments Any lines starting with an octothorpe (#) are comment lines and are ignored. OPTIONS
dtck takes two types of options. Options of the first type are handled directly by dtck, controlling its output and processing. Options of the second type are passed to the file-checking programs and are not further handled by dtck. Options Handled by dtck -defcon This option directs dtck to add the default DNSSEC-Tools configuration file to the list of configuration files to be checked. -list The names of the files will be listed as they are checked. -pretty Clarifying output is added to the output from dtck and the file-checking programs. -help Display a usage message. Options Not Handled by dtck -count The file-checking programs will display a final error count. -quiet No output will be given by the file-checking program. -verbose Verbose output will be given by the file-checking program. -Version Displays the version information for dtck and the DNSSEC-Tools package. COPYRIGHT
Copyright 2007-2012 SPARTA, Inc. All rights reserved. See the COPYING file included with the DNSSEC-Tools package for details. AUTHOR
Wayne Morrison, tewok@tislabs.com SEE ALSO
dtconfchk(8), krfcheck(8), rollchk(8) dnssec-tools.conf(5), keyrec(5), rollrec(5) perl v5.14.2 2012-06-21 DTCK(1p)
All times are GMT -4. The time now is 06:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy