07-16-2007
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
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I have a shell variable $test1 that holds a value derived from some other processing. What I need to do is use that $test1 as the input to a awk regular expression:
nawk -F"," -v tester=$test1 '
/tester/{
print $0
}
' $inputFile
So what I have is tester... (6 Replies)
Discussion started by: not4google
6 Replies
2. Shell Programming and Scripting
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
3. Shell Programming and Scripting
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
4. Shell Programming and Scripting
Hello together,
Yesterday I have recieved the script in the forum which works well.
This script should insert in the previous line, the line that starts with ";".
I'd like this process to recur after any arbitrary sign unless there's a number as a sign at the beginning of a line.
Actual... (14 Replies)
Discussion started by: research3
14 Replies
5. Shell Programming and Scripting
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
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
./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
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
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
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
LEARN ABOUT DEBIAN
latexml::util::pathname
LaTeXML::Util::Pathname(3pm) User Contributed Perl Documentation LaTeXML::Util::Pathname(3pm)
NAME
"LaTeXML::Util::Pathname" - portable pathname and file-system utilities
DESCRIPTION
This module combines the functionality File::Spec and File::Basename to give a consistent set of filename utilties for LaTeXML. A pathname
is represented by a simple string.
Pathname Manipulations
"$path = pathname_make(%peices);"
Constructs a pathname from the keywords in pieces
dir : directory
name : the filename (possibly with extension)
type : the filename extension
"($dir,$name,$type) = pathname_split($path);"
Splits the pathname $path into the components: directory, name and type.
"$path = pathname_canonical($path);"
Canonicallizes the pathname $path by simplifying repeated slashes, dots representing the current or parent directory, etc.
"$dir = pathname_directory($path);"
Returns the directory component of the pathname $path.
"$name = pathname_name($path);"
Returns the name component of the pathname $path.
"$type = pathname_type($path);"
Returns the type component of the pathname $path.
"$path = pathname_concat($dir,$file);"
Returns the pathname resulting from concatenating the directory $dir and filename $file.
"$boole = pathname_is_absolute($path);"
Returns whether the pathname $path appears to be an absolute pathname.
"$path = pathname_relative($path,$base);"
Returns the path to file $path relative to the directory $base.
"$path = pathname_absolute($path,$base);"
Returns the absolute pathname resulting from interpretting $path relative to the directory $base. If $path is already absolute, it is
returned unchanged.
File System Operations
"$modtime = pathname_timestamp($path);"
Returns the modification time of the file named by $path, or undef if the file does not exist.
"$path = pathname_cwd();"
Returns the current working directory.
"$dir = pathname_mkdir($dir);"
Creates the directory $dir and all missing ancestors. It returns $dir if successful, else undef.
"$dest = pathname_copy($source,$dest);"
Copies the file $source to $dest if needed; ie. if $dest is missing or older than $source. It preserves the timestamp of $source.
"$path = pathname_find($name,%options);"
Finds the first file named $name that exists and that matches the specification in the keywords %options. An absolute pathname is
returned.
If $name is not already an absolute pathname, then the option "paths" determines directories to recursively search. It should be a
list of pathnames, any relative paths are interpreted relative to the current directory. If "paths" is omitted, then the current
directory is searched.
If the option "installation_subdir" is given, it indicates, in addition to the above, a directory relative to the LaTeXML installation
directory to search. This allows files included with the distribution to be found.
The "types" option specifies a list of filetypes to search for. If not supplied, then the filename must match exactly.
"@paths = pathname_findall($name,%options);"
Like "pathname_find", but returns all matching paths that exist.
AUTHOR
Bruce Miller <bruce.miller@nist.gov>
COPYRIGHT
Public domain software, produced as part of work done by the United States Government & not subject to copyright in the US.
perl v5.10.1 2009-06-11 LaTeXML::Util::Pathname(3pm)