Sponsored Content
Top Forums Shell Programming and Scripting Hidden Characters in Regular Expression Matching Perl - Perl Newbie Post 302541858 by yazu on Tuesday 26th of July 2011 03:05:35 AM
Old 07-26-2011
First - you shouldn't use quotes around s/computer/WINNER/g. Second, perl allows use control chars in its strings and regexes like "\cA" for Ctrl-A.

I hope this information is enough for your assignment.

Good luck!
This User Gave Thanks to yazu For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Regular expression help in perl

Hi all, I am trying to match a multi line string and return the matching string in one line. Here is the perl code that I wrote: #!/usr/bin/perl my $str='<title>My title</title>'; if ($str =~ /(<title>)(+)(<\/title>)/ ){ print "$2\n"; } It returns : My title I want the... (3 Replies)
Discussion started by: sdubey
3 Replies

2. Shell Programming and Scripting

perl regular expression

letz say that my file has 7 records with only one field. So my file has: 11111111 000000000000000 1111 aaaabbbccc 1111111222000000 aaaaaaaa zz All i need is: 1. when the field has a repetition of the same instance(a-z or 0-9), i would consideer it to be invalid.... (1 Reply)
Discussion started by: helengoldman
1 Replies

3. Programming

Regular Expression matching in PERL

I am trying to read a file and capture particular lines into different strings: LENGTH: Some Content here TEXT: Some Content Here COMMENT: Some Content Here I want to be able to get (LENGTH: .... ) into one array and so on... I'm trying to use PERL in slurp mode but for some reason... (8 Replies)
Discussion started by: Legend986
8 Replies

4. Shell Programming and Scripting

regular expression in perl

hi, i want to extract the sessionID from this line. QnA Session Id : here the output should be-- QnA_SessionID=128589 Thanks NT (3 Replies)
Discussion started by: namishtiwari
3 Replies

5. Shell Programming and Scripting

Regular expression matching in BASH (equivalent of =~ in Perl)

In Perl I can write a condition that evaluates a match expression like this: if ($foo =~ /^bar/) { do blah blah blah } How do I write this in shell? What I need to know is what operator do I use? The '=~' doesn't seem to fit. I've tried different operators, I browsed the man page for... (3 Replies)
Discussion started by: indiana_tas
3 Replies

6. Shell Programming and Scripting

Need perl regular expression

Hi, I am looking for a Perl regular expression to match the below pattern of a java script file. var so = object.device.load('camera','value'); I want to grep out such lines present in the *.js files. The conditions are: a) the line may start with blank space(s) b) always the... (3 Replies)
Discussion started by: royalibrahim
3 Replies

7. Shell Programming and Scripting

Perl Regular Expression

Hello, I am trying to use perl LWP module to read and get a specfic URL page. The issue is that the URL ends with the data and time and time is not consistent it changes all the time. if anyone could help me how to write a regular expressin that would work in the LWP::UserAgent get function to... (0 Replies)
Discussion started by: bataf
0 Replies

8. Shell Programming and Scripting

Perl regular expression and %

Could you help me with this please. This regular expression seems to match for the wrong input #!/usr/bin/perl my $inputtext = "W1a$%XXX"; if($inputtext =~ m/+X+/) { print "matches\n"; } The problem seems to be %. if inputtext is W1a$XXX, the regex doesnot match.... (5 Replies)
Discussion started by: suppandi7
5 Replies

9. Programming

Perl: How to read from a file, do regular expression and then replace the found regular expression

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

10. Shell Programming and Scripting

perl regular expression to remove the special characters

I had a string in perl script as below. Tue Augáá7 03:54:12 2012 Now I need to replace the special character with space. After removing the special chaacters Tue Aug 7 03:54:12 2012 Could anyone please help me here for writing the regular expression? Thanks in advance.. Regards, GS (1 Reply)
Discussion started by: giridhar276
1 Replies
MANDOS-MONITOR(8)						   Mandos Manual						 MANDOS-MONITOR(8)

NAME
mandos-monitor - Text-based GUI to control the Mandos server. SYNOPSIS
mandos-monitor DESCRIPTION
mandos-monitor is an interactive program to monitor and control the operations of the Mandos server (see mandos(8)). PURPOSE
The purpose of this is to enable remote and unattended rebooting of client host computer with an encrypted root file system. See the section called "OVERVIEW" for details. OVERVIEW
This is part of the Mandos system for allowing computers to have encrypted root file systems and at the same time be capable of remote and/or unattended reboots. The computers run a small client program in the initial RAM disk environment which will communicate with a server over a network. All network communication is encrypted using TLS. The clients are identified by the server using an OpenPGP key; each client has one unique to it. The server sends the clients an encrypted password. The encrypted password is decrypted by the clients using the same OpenPGP key, and the password is then used to unlock the root file system, whereupon the computers can continue booting normally. This program is used to monitor and control the Mandos server. In particular, it can be used to approve Mandos clients which have been configured to require approval. It also shows all significant events reported by the Mandos server. KEYS
This program is used to monitor and control the Mandos server. In particular, it can be used to approve Mandos clients which have been configured to require approval. It also shows all significant events reported by the Mandos server. Table 1. Global Keys +---------------------------+-----------------------------+ |Keys | Function | +---------------------------+-----------------------------+ |q, Q | Quit | +---------------------------+-----------------------------+ |Ctrl-L | Redraw screen | +---------------------------+-----------------------------+ |?, F1 | Show help | +---------------------------+-----------------------------+ |l, D | Toggle log window | +---------------------------+-----------------------------+ |TAB | Switch window | +---------------------------+-----------------------------+ |w, i | Toggle log window line wrap | +---------------------------+-----------------------------+ |Up, Ctrl-P, k | Move up a line | +---------------------------+-----------------------------+ |Down, Ctrl-N, j | Move down a line | +---------------------------+-----------------------------+ |PageUp, Meta-V, b | Move up a page | +---------------------------+-----------------------------+ |PageDown, Ctrl-V, SPACE, f | Move down a page | +---------------------------+-----------------------------+ Table 2. Client List Keys +-------------+-------------------------------------------+ |Keys | Function | +-------------+-------------------------------------------+ |+ | Enable client | +-------------+-------------------------------------------+ |- | Disable client | +-------------+-------------------------------------------+ |a | Approve client | +-------------+-------------------------------------------+ |d | Deny client | +-------------+-------------------------------------------+ |R, _, Ctrl-K | Remove client | +-------------+-------------------------------------------+ |s | Start checker for client | +-------------+-------------------------------------------+ |S | Stop checker for client | +-------------+-------------------------------------------+ |C | Force a successful check for this client. | +-------------+-------------------------------------------+ BUGS
This program can currently only be used to monitor and control a Mandos server with the default D-Bus service name of "Mandos". EXAMPLE
This program takes no options: mandos-monitor SECURITY
This program must be permitted to access the Mandos server via the D-Bus interface. This normally requires the root user, but could be configured otherwise by reconfiguring the D-Bus server. SEE ALSO
intro(8mandos), mandos(8), mandos-ctl(8) COPYRIGHT
Copyright (C) 2010-2012 Teddy Hogeborn, Bjorn Pahlsson This manual page is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This manual page is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. Mandos 1.5.5 2012-01-01 MANDOS-MONITOR(8)
All times are GMT -4. The time now is 02:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy