Sponsored Content
Top Forums Shell Programming and Scripting [Help]RegEx, Putty, Copy Files Insensitive Matching, SSH Post 302255024 by Annihilannic on Wednesday 5th of November 2008 06:31:39 PM
Old 11-05-2008
Yep, not forgetting the *...
 

10 More Discussions You Might Find Interesting

1. Solaris

SSH with Putty

I've been trying to setup my SunBlade as an SSH server. I configured the sshd_config file, but I cannot get the keys to exchange properly. I generate a key pair in Putty on my laptop (the host, running Win2K), exported the Private key as OpenSSH and then copied the public key to the a file I... (3 Replies)
Discussion started by: AJA
3 Replies

2. UNIX for Advanced & Expert Users

Automate with Putty-SSH for 2 users

Hi, I have automated logins to Unix boxes with Ssh - Putty combination. Have created a Pub - Pvt key combination for the same. Added the entry of username in "User name" box of Putty. This works perfectly for the specified user. I want this to happen now for another user as well, without... (0 Replies)
Discussion started by: vibhor_agarwali
0 Replies

3. Shell Programming and Scripting

problem in nawk : case insensitive pattern matching

HI, My file contains data something like 034500,5,B5004946544EB185,DEFAULT,0 Now i want to do a pettern match for DEFAULT and remove that particular line from file and transfer the rest contents to temp file.But my req is i want to do case insensitive matching ie DEFAULT / default. I... (4 Replies)
Discussion started by: centurion_13
4 Replies

4. Solaris

how to get to openboot through ssh putty?

hi, iīm trying to get openboot through ssh putty, could you tell me the way because i donīt have a sun keyboard.. thanks... (3 Replies)
Discussion started by: pabloli150
3 Replies

5. UNIX for Dummies Questions & Answers

copy all files matching the request and change the extension at the same time

Hi everyone When I'm starting my script I'm giving to it two parameters: script.sh ext1 ext2 I need to copy all files in a directory fitting ext1, to the same folder, with the same names, but with the changed extension to ext2. Till now I've just managed to do it for only 1 file, but I... (16 Replies)
Discussion started by: vacuity93
16 Replies

6. Shell Programming and Scripting

Copy multiple files from A to B through passwordless ssh

hi all, I need to write one script to copy multiple imp files like /etc/passwd /etc/group /etc/shadow /etc/printers.conf from system A, System B and system C to system Z and I need to execute this script on System Z. like if system is equal A copy 1 2 3 files to system Z into... (9 Replies)
Discussion started by: manalisharmabe
9 Replies

7. UNIX for Advanced & Expert Users

Can I disable the copy and paste of putty/secureCRT?

I'm a teacher who teaching computer programming languages. Generally, I give each student a username in a Linux Server. Then each student use his username to login the Server and program their programming task by putty or secureCRT and so on. But one fact had bothered me for a long... (9 Replies)
Discussion started by: cqlouis
9 Replies

8. Shell Programming and Scripting

How to use scp for case insensitive copy?

Hi, I have a requirement to copy files from one server to other using SCP. I am using * to copy files as I just need to pick up the files that are ending with .OK. But few ok files are in upper case and few are in lower case. If I am using below code, only files with upper case OK are being... (1 Reply)
Discussion started by: Nikhath
1 Replies

9. Shell Programming and Scripting

Copy files matching multiple conditions

Hello How do i copy files matching multiple conditions. Requirement is to search files starting with name abc* and def* and created on a particular date or date range given by the user and copy it to the destination folder. i tried with different commands. below one will give the list ,... (5 Replies)
Discussion started by: NarayanaPrakash
5 Replies

10. Shell Programming and Scripting

Bash to copy subfolder and files to matching directory

The bash executes but returns no results and the set -xv showed while the $run variable in blue, was extracted correctly, the $match value in green, was not, rather both values in home/cmccabe/Desktop/f1 were extracted not just the matching. There will always be an exact match from the $run to... (7 Replies)
Discussion started by: cmccabe
7 Replies
MIME::Words(3)						User Contributed Perl Documentation					    MIME::Words(3)

NAME
MIME::Words - deal with RFC 2047 encoded words SYNOPSIS
Before reading further, you should see MIME::Tools to make sure that you understand where this module fits into the grand scheme of things. Go on, do it now. I'll wait. Ready? Ok... use MIME::Words qw(:all); ### Decode the string into another string, forgetting the charsets: $decoded = decode_mimewords( 'To: =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@dkuug.dk>', ); ### Split string into array of decoded [DATA,CHARSET] pairs: @decoded = decode_mimewords( 'To: =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@dkuug.dk>', ); ### Encode a single unsafe word: $encoded = encode_mimeword("xABFranxE7oisxBB"); ### Encode a string, trying to find the unsafe words inside it: $encoded = encode_mimewords("Me and xABFranxE7oisxBB in town"); DESCRIPTION
Fellow Americans, you probably won't know what the hell this module is for. Europeans, Russians, et al, you probably do. ":-)". For example, here's a valid MIME header you might get: From: =?US-ASCII?Q?Keith_Moore?= <moore@cs.utk.edu> To: =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@dkuug.dk> CC: =?ISO-8859-1?Q?Andr=E9_?= Pirard <PIRARD@vm1.ulg.ac.be> Subject: =?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?= =?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?= =?US-ASCII?Q?.._cool!?= The fields basically decode to (sorry, I can only approximate the Latin characters with 7 bit sequences /o and 'e): From: Keith Moore <moore@cs.utk.edu> To: Keld J/orn Simonsen <keld@dkuug.dk> CC: Andr'e Pirard <PIRARD@vm1.ulg.ac.be> Subject: If you can read this you understand the example... cool! PUBLIC INTERFACE
decode_mimewords ENCODED Function. Go through the string looking for RFC 2047-style "Q" (quoted-printable, sort of) or "B" (base64) encoding, and decode them. In an array context, splits the ENCODED string into a list of decoded "[DATA, CHARSET]" pairs, and returns that list. Unencoded data are returned in a 1-element array "[DATA]", giving an effective CHARSET of "undef". $enc = '=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@dkuug.dk>'; foreach (decode_mimewords($enc)) { print "", ($_->[1] || 'US-ASCII'), ": ", $_->[0], " "; } In a scalar context, joins the "data" elements of the above list together, and returns that. Warning: this is information-lossy, and probably not what you want, but if you know that all charsets in the ENCODED string are identical, it might be useful to you. (Before you use this, please see "unmime" in MIME::WordDecoder, which is probably what you want.) In the event of a syntax error, $@ will be set to a description of the error, but parsing will continue as best as possible (so as to get something back when decoding headers). $@ will be false if no error was detected. Any arguments past the ENCODED string are taken to define a hash of options: encode_mimeword RAW, [ENCODING], [CHARSET] Function. Encode a single RAW "word" that has unsafe characters. The "word" will be encoded in its entirety. ### Encode "<<Franc,ois>>": $encoded = encode_mimeword("xABFranxE7oisxBB"); You may specify the ENCODING ("Q" or "B"), which defaults to "Q". You may specify the CHARSET, which defaults to "iso-8859-1". encode_mimewords RAW, [OPTS] Function. Given a RAW string, try to find and encode all "unsafe" sequences of characters: ### Encode a string with some unsafe "words": $encoded = encode_mimewords("Me and xABFranxE7oisxBB"); Returns the encoded string. Any arguments past the RAW string are taken to define a hash of options: Charset Encode all unsafe stuff with this charset. Default is 'ISO-8859-1', a.k.a. "Latin-1". Encoding The encoding to use, "q" or "b". The default is "q". Warning: this is a quick-and-dirty solution, intended for character sets which overlap ASCII. It does not comply with the RFC 2047 rules regarding the use of encoded words in message headers. You may want to roll your own variant, using "encode_mimeword()", for your application. Thanks to Jan Kasprzak for reminding me about this problem. SEE ALSO
MIME::Base64, MIME::QuotedPrint, MIME::Tools For other implementations of this or similar functionality (particularly, ones with proper UTF8 support), see: Encode::MIME::Header, MIME::EncWords, MIME::AltWords At some future point, one of these implementations will likely replace MIME::Words and MIME::Words will become deprecated. NOTES
Exports its principle functions by default, in keeping with MIME::Base64 and MIME::QuotedPrint. AUTHOR
Eryq (eryq@zeegee.com), ZeeGee Software Inc (http://www.zeegee.com). David F. Skoll (dfs@roaringpenguin.com) http://www.roaringpenguin.com All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Thanks also to... Kent Boortz For providing the idea, and the baseline RFC-1522-decoding code! KJJ at PrimeNet For requesting that this be split into its own module. Stephane Barizien For reporting a nasty bug. perl v5.18.2 2013-11-14 MIME::Words(3)
All times are GMT -4. The time now is 01:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy