10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi guys,
I need a help with a query. Basically i want to know the difference between (0+01)* and ((0+01)*)* . It seems whatever string can be generated by the first RE can also be generated by second and they should essentially be same. Am i missing something? (1 Reply)
Discussion started by: srkmish
1 Replies
2. UNIX for Dummies Questions & Answers
Hello,
I'm trying to rename a bunch of files that were named incorrectly. I know a little about regular expressions but I'm not very good at them.
Here is the image of the file names:
http://i47.tinypic.com/np2gxi.jpg
I'm trying to change the 20111116 at the beginning to 20101116 for all... (2 Replies)
Discussion started by: nastyn8
2 Replies
3. Programming
Hi all,
How am I read a file, find the match regular expression and overwrite to the same files.
open DESTINATION_FILE, "<tmptravl.dat" or die "tmptravl.dat";
open NEW_DESTINATION_FILE, ">new_tmptravl.dat" or die "new_tmptravl.dat";
while (<DESTINATION_FILE>)
{
# print... (1 Reply)
Discussion started by: jessy83
1 Replies
4. UNIX for Dummies Questions & Answers
I like to loop a list of files which named file1, file2, file3, file4, etc
if I like to loop them all over
for f in file1, file2, file3, file4
do
echo "processing" $f
done
how to use a regular expression to loop file$i instead?
Thank you. (4 Replies)
Discussion started by: ksgreen
4 Replies
5. Shell Programming and Scripting
Hey all! what matching expression might I use to match all characters included in \W, EXCEPT < and > ?
for example:
@tokens=split(/ ???? /,$string);
I've dubiously tried \W but this clips off the first letter of each "token", for some reason ... (2 Replies)
Discussion started by: applefat
2 Replies
6. UNIX for Dummies Questions & Answers
Folks;
Could some one tell me what these 2 regular expressions mean:
*/(*)/*
(\d\d\d\d/\d\d/\d\d/*?) (14 Replies)
Discussion started by: Katkota
14 Replies
7. UNIX for Dummies Questions & Answers
Folks;
I have 3 questions & any help with them would be really appreciated:
If i have a list of directories, for example:
/fs/pas/2007/4/6/2634210/admdat/examin
/fs/pas/2007/4/6/2634210/admdat2/stat
/fs/pas/2007/4/6/2634210/admdat3/data
/fs/pas/2007/4/6/2634210/im_2/0b.dcm
Now; my... (6 Replies)
Discussion started by: Katkota
6 Replies
8. UNIX for Dummies Questions & Answers
anyone knows what does this regular expression match for?
\(3,\).*\1.*\1 (1 Reply)
Discussion started by: metalwarrior
1 Replies
9. Shell Programming and Scripting
hi
i need to wipe out something from giving path i have some thing like that :
pwd | sed 's/.*foo//'
it is working fine when I have path like : /blah/balh1/foo/moo
so it erasing me all that comes before the foo including the foo
but I have problem when I have dir by the name of... (7 Replies)
Discussion started by: umen
7 Replies
10. UNIX for Dummies Questions & Answers
Hi - I am trying to ignore the following items from a list.
lp0
lp11
lp12
lp14
The following code works fine, but I was wondering if there was a tidier way to write the lp regular expression?
egrep -v "lp"
Thanks in advance. (3 Replies)
Discussion started by: Krispy
3 Replies
SOURCE-HIGHLIGHT(1) User Commands SOURCE-HIGHLIGHT(1)
NAME
Source-highlight - convert source code to syntax highlighted document
SYNOPSIS
source-highlight [OPTIONS]... < input_file > output_file
DESCRIPTION
GNU source-highlight 3.1.6
Highlight the syntax of a source file (e.g. Java) into a specific format (e.g. HTML)
source-highlight [OPTIONS]... -i input_file -o output_file source-highlight [OPTIONS]... [FILES]...
-h, --help
Print help and exit
--detailed-help
Print help, including all details and hidden options, and exit
-V, --version
Print version and exit
-i, --input=filename
input file. default std input
-o, --output=filename
output file. default std output (when the third invocation form is used). If STDOUT is specified, the output is directed to standard
output
you can simply specify some files at the command line and also use regular expressions (for instance *.java). In this case the name for
the output files will be formed using the name of the source file with a .<ext> appended, where <ext> is the extension chosen according to
the output format specified (for instance .html).
-s, --src-lang=STRING
source language (use --lang-list to get the complete list). If not specified, the source language will be guessed from the file
extension.
--lang-list
list all the supported language and associated language definition file
--outlang-list
list all the supported output language and associated language definition file
-f, --out-format=STRING
output format (use --outlang-list to get the complete list) (default=`html')
-d, --doc
create an output file that can be used as a stand alone document (e.g., not to be included in another one)
--no-doc
cancel the --doc option even if it is implied (e.g., when css is given)
-c, --css=filename
the external style sheet filename. Implies --doc
-T, --title=STRING
give a title to the output document. Implies --doc
-t, --tab=INT
specify tab length. (default=`8')
-H, --header=filename
file to insert as header
-F, --footer=filename
file to insert as footer
--style-file=filename
specify the file containing format options (default=`default.style')
--style-css-file=filename specify the file containing format options (in
css syntax)
--style-defaults=filename specify the file containing defaults for format
options (default=`style.defaults')
--outlang-def=filename
output language definition file
--outlang-map=filename
output language map file (default=`outlang.map')
--data-dir=path
directory where language definition files and language maps are searched for. If not specified these files are searched for in the
current directory and in the data dir installation directory
--output-dir=path
output directory
--lang-def=filename
language definition file
--lang-map=filename
language map file (default=`lang.map')
--show-lang-elements=filename
prints the language elements that are defined
in the language definition file
--infer-lang
force to infer source script language (overriding given language specification)
Lines:
-n, --line-number[=padding]
number all output lines, using the specified padding character (default=`0')
--line-number-ref[=prefix]
number all output lines and generate an anchor,
made of the specified prefix + the line number (default=`line')
Filtering output:
Mode: linerange
specifying line ranges
--line-range=STRING
generate only the lines in the specified range(s)
--range-separator=STRING
the optional separator to be printed among ranges (e.g., "...")
--range-context=INT
number of (context) lines generated even if not in range
Mode: regexrange
specifying regular expression delimited ranges
--regex-range=STRING
generate only the lines within the specified regular expressions
reference generation:
--gen-references=STRING
generate references (possible values="inline", "postline", "postdoc" default=`inline')
--ctags-file=filename
specify the file generated by ctags that will be used to generate references (default=`tags')
--ctags=cmd
how to run the ctags command. If this option is not specified, ctags will be executed with the default value. If it is specified
with an empty string, ctags will not be executed at all (default=`ctags --excmd=n --tag-relative=yes')
testing:
-v, --verbose
verbose mode on
-q, --quiet
print no progress information
--binary-output
write output files in binary mode
--statistics
print some statistics (i.e., elapsed time)
--gen-version
put source-highlight version in the generated file (default=on)
--check-lang=filename
only check the correctness of a language definition file
--check-outlang=filename
only check the correctness of an output language definition file
--failsafe
if no language definition is found for the input, it is simply copied to the output
-g, --debug-langdef[=type]
debug a language definition. In dump mode just dumps all the steps; in interactive, at each step, waits for some input (press ENTER
to step) (possible values="interactive", "dump" default=`dump')
--show-regex=filename
show the regular expression automaton corresponding to a language definition file
Maintained by Lorenzo Bettini <http://www.lorenzobettini.it>
REPORTING BUGS
Report bugs to <bug-source-highlight at gnu.org>
COPYRIGHT
Copyright (C) 1999-2008 Lorenzo Bettini <http://www.lorenzobettini.it> This program comes with ABSOLUTELY NO WARRANTY.
This is free software; you may redistribute copies of the program under the terms of the GNU General Public License. For more information
about these matters, see the file named COPYING.
SEE ALSO
The full documentation for Source-highlight is maintained as a Texinfo manual. If the info and Source-highlight programs are properly
installed at your site, the command
info Source-highlight
should give you access to the complete manual.
Source-highlight 3.1.6 (library: 4:0:0) December 2011 SOURCE-HIGHLIGHT(1)