Hello All,
I have been using String.h with gcc 2.95. Now I have upgraded to gcc 3.4. The support for String.h has been removed and I believe Regex.h support is also not inbuilt. So I tried to build my own library for String.h. I had to use Regex.h and rx.h for a succesful library compilation.... (0 Replies)
Hi,
Can someone tell me why the first regular expression with the + fails to match the input string?
SUN /web>echo cat | grep '+'
SUN /web>echo cat | grep ''
cat
I'm running SunOS 5.10
Thanks.
Chris (2 Replies)
Hi there,
How can we use regex in perl to store the Route Distinguisher (the bold field) and also the underlined and bold lines in the below file?
Note:
These highlighted pattern is redundant through the whole input file. Basically, we just need to extract these fields at least to store them... (4 Replies)
Need some help with a regex if loop problem.
File1:
2323
3232
4230
3230
4340
4343
233
32320
I want to print "Zero" if the number ends with a zero, but print "number" if it does not!
#!/bin/bash
/usr/bin/nawk '{
if ($1 ==/+0\b/){
print "Zero"}
else{
print "number"} (5 Replies)
Hi,
I tried to extract the time from `date` with sed.
(I know it works with `date +%H:%M:%S` as well)
I got three solutions of which just one worked. I thought "+" should repeat the previous expression 1 or more times and {n} should repeat the previous expression n times.
$ date
Thu... (9 Replies)
Hi,
I am looking for regex to extract following words from text:
The word which comes after "Replaced" means
Replaced disk
Replaced floppy
Replaced memory
Please suggest the regex for it.
Thanks! (4 Replies)
Script logs into switches on my list but nothing seems to happen.
Following error:
tr nope, doesn't (yet) match (?-xism:-]+ ?(?:\(config*\))? ? ?$)
du SEEN:
Here is code in question:
@version_info = $session_obj->cmd('term length 0');
$session_obj->cmd('show int | i... (5 Replies)
Discussion started by: mrlayance
5 Replies
LEARN ABOUT LINUX
shtool-path
SHTOOL-PATH.TMP(1) GNU Portable Shell Tool SHTOOL-PATH.TMP(1)NAME
shtool-path - GNU shtool command dealing with shell path variables
SYNOPSIS
shtool path [-s|--suppress] [-r|--reverse] [-d|--dirname] [-b|--basename] [-m|--magic] [-p|--path path] str [str ...]
DESCRIPTION
This command deals with shell $PATH variables. It can find a program through one or more filenames given by one or more str arguments. It
prints the absolute filesystem path to the program displayed on "stdout" plus an exit code of 0 if it was really found.
OPTIONS
The following command line options are available.
-s, --suppress
Supress output. Useful to only test whether a program exists with the help of the return code.
-r, --reverse
Transform a forward path to a subdirectory into a reverse path.
-d, --dirname
Output the directory name of str.
-b, --basename
Output the base name of str.
-m, --magic
Enable advanced magic search for ""perl"" and ""cpp"".
-p, --path path
Search in path. Default is to search in $PATH.
EXAMPLE
# shell script
awk=`shtool path -p "${PATH}:." gawk nawk awk`
perl=`shtool path -m perl`
cpp=`shtool path -m cpp`
revpath=`shtool path -r path/to/subdir`
HISTORY
The GNU shtool path command was originally written by Ralf S. Engelschall <rse@engelschall.com> in 1998 for Apache. It was later taken
over into GNU shtool.
SEE ALSO shtool(1), which(1).
18-Jul-2008 shtool 2.0.8 SHTOOL-PATH.TMP(1)