Sponsored Content
Top Forums Shell Programming and Scripting Command param subst to reg expression Post 59507 by Perderabo on Tuesday 21st of December 2004 12:49:48 PM
Old 12-21-2004
Quote:
Originally posted by druuna
I wouldn't know a way of putting a variable into a /^VAR/ construct.
You would if you would read our faqs or at least the one entitled "Passing variables/arguments/parameters to commands".
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Help with Reg. Expression

I need help with this: Can any one tell me what does these below mean: 1. "\(.\).*") != '/' 2. sed 's+^\./++;s+/.*++' 3. sed "s+${f}/+ + Thanks in advance (7 Replies)
Discussion started by: moe2266
7 Replies

2. Shell Programming and Scripting

assign subst|grep|sed command result to a variable

Hi, I'm quite new to scripting and I want to modify following line of an existing script: MYVAR=`subst |grep 'L:\\\:' | sed -e 's/.*\\\//'`; What I have to do is to use the content of a variable instead of the constant expression 'L:\\\:' as the grep string to be matched. Assuming I already... (5 Replies)
Discussion started by: snowbiker99
5 Replies

3. Shell Programming and Scripting

perl reg expression

I have regular expression like this ( replace + with \+) ($mod_server) = ($server =~ /\+/\\+/g); the above is failing with error . what's wrong with it . Thanks (1 Reply)
Discussion started by: talashil
1 Replies

4. Shell Programming and Scripting

Reg expression For

HI system.sysUpTime.0 : Timeticks: (1519411311) 175 days, 20:35:13.11 From the above output i need only 175days in a perl script.. Please Help (2 Replies)
Discussion started by: Harikrishna
2 Replies

5. Shell Programming and Scripting

awk reg expression

Hello, I have thousand of messages (HL7), I want to use awk to extract only the ones that have a particular value in pv1.18 Each record in the file is the whole HL7 message, ie. when I print $0 I get the whole message MSH EVN PID etc. ,there is an x0d between the segments. I would like to use a... (3 Replies)
Discussion started by: gio001
3 Replies

6. Shell Programming and Scripting

Reg expression

Please let me understand this reg expression (\s+')(.*)('\s+)(.)(.*)(\/.*)/) i have doubt in the below 2.I'm not understanding why back-tick used? (\s+') and ('\s+) (2 Replies)
Discussion started by: dll_fpga
2 Replies

7. Shell Programming and Scripting

reg expression in perl

./GEN_SCR.pl -f ${REP_PATH}/FUNCTIONAL/wide1c_1.0V/max/qor.rpt -o ${REP_PATH}/FUNCTIONAL/GEN2_wide1c_1.0V_max.csv where GEN_SCR.pl is as below...i need to check whether max or min is coming in the argument to the script ...how to do this? ${REP_PATH}/FUNCTIONAL/wide1c_1.0V/max/qor.rpt ... (0 Replies)
Discussion started by: dll_fpga
0 Replies

8. Shell Programming and Scripting

reg expression in perl

how to uniquely match each of the words seperated by / in perl ${REP_PATH}/FUNCTIONAL/wide1c_1.0V/max/qor.rpt https://www.unix.com/images/misc/progress.gif (5 Replies)
Discussion started by: dll_fpga
5 Replies

9. Shell Programming and Scripting

Confusion with Reg expression

I want to make a REG Expression to validate the directory. my dirsample is below: /abc/abc/abc abc/abc/abc abc/abc/abc/ /abc/a bc/abc /a bc/abc/abc /abc/abc/a bc / abc/abc/abc /abc/ abc/abc /abc/.abc /.abc/abc / // /abc /.abc And my code is below: grep -E '^\/(+\/?)+$' dirsample (4 Replies)
Discussion started by: franksunnn
4 Replies

10. Shell Programming and Scripting

REG Expression

Need your help in creating regular expression for particular set. let say I have given two dates 20130623 to 20140625. I need to create regular for the dates which fall in between above two dates. (4 Replies)
Discussion started by: gvkumar25
4 Replies
DI(3)							     Library Functions Manual							     DI(3)

NAME
DI - verify assertions in C and C++ code using gdb(1) SYNOPSIS
#include <DI.h> DI(exprn) DIG(exprn,guard) DIH(exprn,handler) DIP(exprn,param) DIGH(exprn,guard,handler) DIHP(exprn,handler,param) DIGHP(exprn,guard,handler,param) DS(exprn) DESCRIPTION
The DI(exprn) checks that the exprn is true in the same way as assert(3). It is however implemented by generating debugger commands from the source code and so only works if you run the command under a debugger after source the command file generated by nana(1). exprn - the expression to be checked. guard - the expression is normally only checked if the guard is true. handler - a macro which generates the code that handles the error condition. param - a parameter which can be passed off to the handler. This can be used for identifying the assertion failure in a space-efficent man- ner, e.g. by copying it into a register before aborting. See nana.info for details on configuring the behaviour on error detection, etc. You also need to include the nana library by using -lnana if you use the default setup. In addition to the DI, DIG, etc DI.h also provides DN, DNG, etc which are used to check that an expression is never true. SEE ALSO
nana-clg(1), nana(1), nana(3), I(3), L(3), DL(3), Q(3) and nana.info. The nana.info file is the primary documentation for this library. AUTHOR
Phil Maker <pjm@gnu.org> DI(3)
All times are GMT -4. The time now is 06:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy