Sponsored Content
Full Discussion: RegEX help needed
Top Forums UNIX for Dummies Questions & Answers RegEX help needed Post 302753201 by skhichi on Tuesday 8th of January 2013 08:52:24 AM
Old 01-08-2013
RegEX help needed

Hi,

Have to filter out string before the last underscore in the following

input: UNIX_Solaris_59_KSH

output: UNIX_Solaris_59

dummy one but Smilie

Thanks & Regards,
Sourabh Singh Khichi

Last edited by vbe; 01-08-2013 at 10:00 AM.. Reason: icodes...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sed and regex help needed

Hi all, I'm writing a script that replaces a value in a file. The file is formatted as follows: So, for this example, I'd like to replace the value for param_two. The value for param_two can be a one, or two-digit number. It replaces the value in file.cfg, and directs the... (9 Replies)
Discussion started by: marknu1
9 Replies

2. Shell Programming and Scripting

Converting perl regex to sed regex

I am having trouble parsing rpm filenames in a shell script.. I found a snippet of perl code that will perform the task but I really don't have time to rewrite the entire script in perl. I cannot for the life of me convert this code into something sed-friendly: if ($rpm =~ /(*)-(*)-(*)\.(.*)/)... (1 Reply)
Discussion started by: suntzu
1 Replies

3. Shell Programming and Scripting

Regex help needed

Hello, I'd like to write a regex that transforms a German base form of a noun into one of its inflected forms, namely I want to translate "Haus" to "Häuser" This is what I've got: /^(.+)$/_Umlaut( $1 )_er/ where _Umlaut( x )_ is a function operating on the noun stem captured by $1 The... (1 Reply)
Discussion started by: Bloomy
1 Replies

4. Shell Programming and Scripting

regex in ls

Hi Experts, I am using ls with regex in the below manner: VAR="*.txt *.TXT" ls -l $VAR This is working fine if I have both txt and TXT extension files in my directory. But if any of them is not present, its throwing errors, that *.TXT file not found in the directory. So what am i missing... (6 Replies)
Discussion started by: sugarcane
6 Replies

5. Shell Programming and Scripting

perl regex help needed

Hi, I want to validate strings in perl, the string may contains characters from a-zA-Z0-9 and symbols +-_.:/\ To validate such a string I computed a regex if ($string =~ m/^/) { print "valid"; } else { print "invalid"; } but this regex also validates strings that contain... (8 Replies)
Discussion started by: zing_foru
8 Replies

6. UNIX for Dummies Questions & Answers

read regex from ID file, print regex and line below from source file

I have a file of protein sequences with headers (my source file). Based on a list of IDs (which are included in some of the headers), I'd like to print out only the specified sequences, with only the ID as header. In other words, I'd like to search source.txt for the terms in IDs.txt, and print... (3 Replies)
Discussion started by: pathunkathunk
3 Replies

7. Shell Programming and Scripting

Help needed in regex

Hi, Could you please help me in writing a regex for the following requirement? Let following be the string format: abc.cdef.ghij.lm I need to check between dots, there is atleast one character{a-z,A-Z,*}. Eg: abc1.gt2.345j is valid, but not 123.abc.vff.gth because 123 should not be... (2 Replies)
Discussion started by: lorzinian
2 Replies

8. UNIX for Dummies Questions & Answers

Regex Needed:(

I am looking for the proper regex to match the hostname "areagc11" of this log.... Any help would be awsome:) Oct 25 11:08:18 areagc11 961: Oct 25 18:08:17.536 GMT: %SYS-5-CONFIG_I: Configured from console by someone onvty1 (10.156.72.97) (6 Replies)
Discussion started by: jlaigo2
6 Replies

9. Shell Programming and Scripting

Perl, RegEx - Help me to understand the regex!

I am not a big expert in regex and have just little understanding of that language. Could you help me to understand the regular Perl expression: ^(?!if\b|else\b|while\b|)(?:+?\s+){1,6}(+\s*)\(*\) *?(?:^*;?+){0,10}\{ ------ This is regex to select functions from a C/C++ source and defined in... (2 Replies)
Discussion started by: alex_5161
2 Replies

10. Shell Programming and Scripting

Sendmail K command regex: adding exclusion/negative lookahead to regex -a@MATCH

I'm trying to get some exclusions into our sendmail regular expression for the K command. The following configuration & regex works: LOCAL_CONFIG # Kcheckaddress regex -a@MATCH +<@+?\.++?\.(us|info|to|br|bid|cn|ru) LOCAL_RULESETS SLocal_check_mail # check address against various regex... (0 Replies)
Discussion started by: RobbieTheK
0 Replies
scalac(1)							   USER COMMANDS							 scalac(1)

NAME
scalac - Compiler for the Scala 2 language SYNOPSIS
scalac [ <options> ] <source files> PARAMETERS
<options> Command line options. See OPTIONS below. <source files> One or more source files to be compiled (such as MyClass.scala). OPTIONS
The compiler has a set of standard options that are supported on the current development environment and will be supported in future releases. An additional set of non-standard options are specific to the current virtual machine implementation and are subject to change in the future. Non-standard options begin with -X. Standard Options -g:{none,source,line,vars,notc} "none" generates no debugging info, "source" generates only the source file attribute, "line" generates source and line number information, "vars" generates source, line number and local variable information, "notc" generates all of the above and will not perform tail call optimization. -nowarn Generate no warnings -verbose Output messages about what the compiler is doing -deprecation Indicate whether source should be compiled with deprecation information; defaults to off (accepted values are: on, off, yes and no) Available since Scala version 2.2.1 -unchecked Enable detailed unchecked warnings Non variable type-arguments in type patterns are unchecked since they are eliminated by erasure Available since Scala version 2.3.0 -classpath <path> Specify where to find user class files (on Unix-based systems a colon-separated list of paths, on Windows-based systems, a semi- colon-separate list of paths). This does not override the built-in ("boot") search path. The default class path is the current directory. Setting the CLASSPATH variable or using the -classpath command-line option over- rides that default, so if you want to include the current directory in the search path, you must include "." in the new settings. -sourcepath <path> Specify where to find input source files. -bootclasspath <path> Override location of bootstrap class files (where to find the standard built-in classes, such as "scala.List"). -extdirs <dirs> Override location of installed extensions. -d <directory> Specify where to place generated class files. -encoding <encoding> Specify character encoding used by source files. The default value is platform-specific (Linux: "UTF8", Windows: "Cp1252"). Executing the following code in the Scala interpreter will return the default value on your system: scala> new java.io.InputStreamReader(System.in).getEncoding -target: <target> Specify which backend to use (jvm-1.5,msil). The default value is "jvm-1.5" (was "jvm-1.4" up to Scala version 2.6.1). -print Print program with all Scala-specific features removed -optimise Generates faster bytecode by applying optimisations to the program -explaintypes Explain type errors in more detail. -uniqid Print identifiers with unique names (debugging option). -version Print product version and exit. -help Print a synopsis of standard options. Advanced Options -Xassem <file> Name of the output assembly (only relevant with -target:msil) -Xassem-path <path> List of assemblies referenced by the program (only relevant with -target:msil) -Xcheck-null Emit warning on selection of nullable reference -Xdisable-assertions Generate no assertions and assumptions -Xexperimental enable experimental extensions -Xno-uescape Disable handling of u unicode escapes -Xplug-types Parse but ignore annotations in more locations -Xplugin: <file> Load a plugin from a file -Xplugin-disable: <plugin> Disable a plugin -Xplugin-list Print a synopsis of loaded plugins -Xplugin-opt: <plugin:opt> Pass an option to a plugin -Xplugin-require: <plugin> Abort unless a plugin is available -Xprint: <phases> Print out program after <phases> (see below). -Xprint-pos Print tree positions (as offsets) -Xprint-types Print tree types (debugging option). -Xprompt Display a prompt after each error (debugging option). -Xresident Compiler stays resident, files to compile are read from standard input. -Xshow-class <class> Show class info. -Xshow-object <object> Show object info. -Xshow-phases Print a synopsis of compiler phases. -Xsource-reader <classname> Specify a custom method for reading source files. -Xscript <object> Compile as a script, wrapping the code into object.main(). Compilation Phases initial initializing compiler parse parse source files namer create symbols analyze name and type analysis refcheck reference checking uncurry uncurry function types and applications lambdalift lambda lifter typesasvalues represent types as values addaccessors add accessors for constructor arguments explicitouterclasses make links from inner classes to enclosing one explicit addconstructors add explicit constructor for each class tailcall add tail-calls wholeprog perform whole program analysis addinterfaces add one interface per class expandmixins expand mixins by code copying boxing makes boxing explicit erasure type eraser icode generate icode codegen enable code generation terminal compilation terminated all matches all phases ENVIRONMENT
JAVACMD Specify the java command to be used for running the Scala code. Arguments may be specified as part of the environment variable; spaces, quotation marks, etc., will be passed directly to the shell for expansion. JAVA_HOME Specify JDK/JRE home directory. This directory is used to locate the java command unless JAVACMD variable set. JAVA_OPTS Specify the options to be passed to the java command defined by JAVACMD. With Java 1.5 (or newer) one may for example configure the memory usage of the JVM as follows: JAVA_OPTS="-Xmx512M -Xms16M -Xss16M" With GNU Java one may configure the memory usage of the GIJ as follows: JAVA_OPTS="--mx512m --ms16m" EXAMPLES
Compile a Scala program to the current directory scalac HelloWorld Compile a Scala program to the destination directory classes scalac -d classes HelloWorld.scala Compile a Scala program using a user-defined java command env JAVACMD=/usr/local/bin/cacao scalac -d classes HelloWorld.scala Compile all Scala files found in the source directory src to the destination directory classes scalac -d classes src/*.scala EXIT STATUS
scalac returns a zero exist status if it succeeds to compile the specified input files. Non zero is returned in case of failure. AUTHOR
Written by Martin Odersky and other members of the Scala team. REPORTING BUGS
Report bugs to http://lampsvn.epfl.ch/trac/scala. COPYRIGHT
This is open-source software, available to you under a BSD-like license. See accomponying "copyright" or "LICENSE" file for copying condi- tions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. SEE ALSO
fsc(1), sbaz(1), scala(1), scaladoc(1), scalap(1) version 0.4 April 18, 2007 scalac(1)
All times are GMT -4. The time now is 10:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy