Sponsored Content
Full Discussion: Perl Regex problem
Top Forums Shell Programming and Scripting Perl Regex problem Post 302985717 by Corona688 on Monday 14th of November 2016 12:22:37 PM
Old 11-14-2016
Show the input you get and the output you want.

I'm not sure that code is actually doing what you want, either. I'm guessing you want to send 'show int' to the switch, and have Perl filter the rest? Or is the command you enter in the switch LITERALLY show int | i proto.* ... because that's what I think is happening here.

Last edited by Corona688; 11-14-2016 at 01:31 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl REGEX

Hi, Can anyone help me to find regular expression for the following in Perl? "The string can only contain lower case letters (a-z) and no more than one of any letter." For example: "table" is accepted, whether "dude" is not. I have coded like this: $str = "table"; if ($str =~ m/\b()\b/) {... (4 Replies)
Discussion started by: evilfreakz
4 Replies

2. Shell Programming and Scripting

Perl regex

I have got numbers like l255677 l376039 l188144 l340482 l440700 l254113 to match the numbers starting with '13' what would be the regex =~/13(.*)/ =======>This is not working .... But for user123,user657 regex =~/user(.*)/ ========>works Thanks for help..!! (7 Replies)
Discussion started by: trina_1
7 Replies

3. 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

4. UNIX for Dummies Questions & Answers

Perl Regex Help!!!

Hi, I get the following when I cat a file *.log xxxxx ===== dasdas gwdgsg fdsagfsag agsdfag ===== random data ===== My output should look like : If the random data after the 2nd ==== is null then OK should be printed else the random data should be printed. How do I go about this... (5 Replies)
Discussion started by: manutd
5 Replies

5. Programming

Perl regex

HI, I'm new to perl and need simple regex for reading a file using my perl script. The text file reads as - filename=/pot/uio/current/myremificates.txt certificates=/pot/uio/current/userdir/conf/user/gamma/settings/security/... (3 Replies)
Discussion started by: jhamaks
3 Replies

6. Programming

Perl regex

Hi Guys I have the following regex $OSRELEASE = $1 if ($output =~ /(Mac OS X (Server )?10.\d)/); output is currently Mac OS X 10.7.5 when the introduction of Mac 10.8 output changes to OS X 10.8.2 they have dropped the Mac bit so i changed the regex to be (2 Replies)
Discussion started by: ab52
2 Replies

7. Programming

Perl regex

Hello folks, Looking for a quick help on regex in my perl script. here's the string i want to parse and get the 2nd field out of it. $str = " 2013-08-07 12:29 Beta ACTIVE"; I want to extract 'Beta' out of this string. This string will keep on changing... (2 Replies)
Discussion started by: jhamaks
2 Replies

8. Shell Programming and Scripting

?= in perl regex

Could anyone please make me understand how the ?= works below .. After executing this I am getting the same output. $string="I love chocolate."; $string =~ s/chocolate(?= ice)/vanilla/; print "$string\n"; (2 Replies)
Discussion started by: scriptscript
2 Replies

9. UNIX for Advanced & Expert Users

Perl regex problem on strings with several occurences of one char

Hi all, i have the following line in a record file : retenu=non demande=non script=#vtbackup /path=/save/backup/demande position=140+70 and i want to use Perl regex to have the following output key : "retenu" value : "non" key : "demande" value "non" key : "script" value :... (2 Replies)
Discussion started by: Fundix
2 Replies

10. 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
IM-SWITCH(8)						      System Manager's Manual						      IM-SWITCH(8)

NAME
im-switch - set up input method for X Window SYNOPSIS
im-switch [-v][-z ll_CC] -s inputmethodname im-switch [-v][-z ll_CC] -c im-switch [-v][-z ll_CC] -a im-switch [-v][-z ll_CC] -l im-switch -h im-switch DESCRIPTION
This manual page very briefly documents the im-switch command. The im-switch command provides the framework to configure and to switch the input method on X Window System depending on the locale. This input method is the essential mechanism for Japanese, Chinese and Korean (CJK) languages to enter their non-ASCII native characters. Some input methods such as IBus, SCIM, and uim support not only one of these CJK languages but support almost all languages simultaneously by dynamically switching keyboard modes with GUI. The most desirable input method is provided as the configurable system wide default using Debian alternatives mechanism with /etc/alterna- tives/xinput-ll_CC link. The X start up code sources /etc/X11/Xsession.d/90im-switch which read the configuration file and activates the input method. The user configuration files and links are located in ~/.xinput.d/ . The system configuration files and links are located in /etc/X11/xinit/xin- put.d/ . This structure ensures to have different input methods to be installed side-by-side. im-switch understands the following options: -v Display verbose message during execution. -z ll_CC Set up the input method for X run under ll_CC locale (ISO 639 / ISO 3188). When changing the fallback default for all locales, use all_ALL as the quasi-locale value here. The setup by this all_ALL does not override specific setups. -s inputmethodname Set up the input method to use inputmethodname. -c Configure the input method with menu. (Under X, this uses GUI.) -a Reset the input method to the system default. -l List the input method configuration. -h Print a help message to the standard output and exit. When the im-switch command is invoked without any command arguments, it functions as -c option case. This is meant to be used by the GUI menu. SEE ALSO
update-alternatives(8) /usr/share/doc/im-switch/README.Debian /etc/X11/xinit/xinput.d/default AUTHOR
This manual page was written by Osamu Aoki <osamu@debian.org>, for the Debian GNU/Linux system (but may be used by others). IM-SWITCH(8)
All times are GMT -4. The time now is 11:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy