Sponsored Content
Top Forums UNIX for Advanced & Expert Users help with private keys (blocs) extraction from file Post 302506152 by pat38000 on Friday 18th of March 2011 04:37:43 PM
Old 03-18-2011
Hi fpmurphy

no need to decode really, I just need to extract these blocs into separate files as hey are. Also, there is no need to take the length of each line into account... It might as well be one unique long (but wrapped) line.

Actually, only the extraction of blocs should be considered here. Another example :


----- start -----
Lorem ipsum an eos sumo accusam abhorreant, an mucius fabulas mei. Eum id dicit consulatu. No nec debet ridens debitis. Vis eu luptatum salutatus adversarium, affert omnium mnesarchum usu et, ex nibh nusquam torquatos pri.
----- end -----
----- start -----
Ullum aperiri virtute an his, qui ex solet tation. Veniam viderer evertitur eos ne. Ad percipit euripidis ius, nam no exerci melius labores. Ea vide doming minimum vix. No tempor latine quaerendum vis. Et labores menandri theophrastus per, eam diam laoreet inciderint ne.
----- end -----
----- start -----
Accumsan dignissim mea ei. Est et libris molestiae. Solum vivendo consulatu ea per. Cum ad sanctus salutatus.
----- end -----

etc.

Thanks !
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

arrow keys / special keys

how to use the arrow keys in shell scripting. is there any special synatax / command for this. i just want to use the arrow keys for navigation. replies appreciated raguram R (3 Replies)
Discussion started by: raguramtgr
3 Replies

2. UNIX for Advanced & Expert Users

SSH public and private keys

Firstly, i apologise if i have posted in a wrong section of the forum. Please let me know which is the correct section my post should go to. I have to SCP a file from one server(server A) to another (server B). I read around that a secure way is to use public and private keys. Assuming my... (2 Replies)
Discussion started by: new2ss
2 Replies

3. UNIX for Dummies Questions & Answers

ssh public/private Keys

Hello, I have an issue with an outside party trying to deliver a file to our server via SFTP. I have setup the .ssh directory under the home directory for the user account that is being used and setup the authorized_keys file with correct permissons etc for .ssh directory and file. We... (2 Replies)
Discussion started by: richo king
2 Replies

4. HP-UX

Problem - Creating SSH Public/Private keys. Please help.

HI, I'm trying to create SSH public/private keys using following command. hp023:/users/vikram> ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/users/vikram/.ssh/id_rsa): rsa Enter passphrase (empty for no passphrase): Enter same passphrase... (9 Replies)
Discussion started by: vickramshetty
9 Replies

5. Solaris

ssh private keys stored on home server

Where in the world are the ssh private keys stored on the home server? I know the public keys are renamed to authorized_keys under the /export/home//.ssh directory on the remote server. (1 Reply)
Discussion started by: jastanle84
1 Replies

6. UNIX for Advanced & Expert Users

openssh 5.3 needs password vs. 4.3 using private keys

Hello, I just installed a bran new Centos 6.2 including openssh 5.3. On older servers I installed older Linux including openssh 4.3, I am using keygen with private/public keys to log root on all servers (in a LAN) without typing password each time. To do this, of course, I have my local... (4 Replies)
Discussion started by: epoins
4 Replies

7. Shell Programming and Scripting

Shell script for SFTP using Public and private keys

Hi all, I needed a shell script for file transfering using public/private keys for authentication. Could you please help me out on this? A procedure to write a shell script is enough. Thanks in advance. Regards. Vidya N (8 Replies)
Discussion started by: Vidya N
8 Replies

8. Shell Programming and Scripting

SFTP - Private and Public keys

Hi All, I have a query....say on server A, I have generated the Private and Public keys and shared the public key with server B. Now i can surelyconnect(without password) from server A to server B..... but can i similarly connect from server B to server A as well Regards (1 Reply)
Discussion started by: Arpit Narula
1 Replies

9. Shell Programming and Scripting

sftp using private and public keys

hi guys , i have few files i have to do sftp, the public and private key work like a magic , no problem at all the syntax is as below sftp -0 identityfile=~/ure/blsl/loc2/.ssh/id_rsa_ssh1 ssh1@remote >log_dir/file.timestamp<<end lcd folder cd folder put * quit end ================ my... (3 Replies)
Discussion started by: rockymayavia
3 Replies

10. Shell Programming and Scripting

FILE_ID extraction from file name and save it in CSV file after looping through each folders

FILE_ID extraction from file name and save it in CSV file after looping through each folders My files are located in UNIX Server, i want to extract file_id and file_name from each file .and save it in a CSV file. How do I do that? I have folders in unix environment, directory structure is... (15 Replies)
Discussion started by: princetd001
15 Replies
Text::Wrap(3)						User Contributed Perl Documentation					     Text::Wrap(3)

NAME
GD::Text::Wrap - Wrap strings in boxes SYNOPSIS
use GD; use GD::Text::Wrap; my $gd = GD::Image->new(800,600); # allocate colours, do other things. my $text = <<EOSTR; Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. EOSTR my $wrapbox = GDTextWrap->new( $gd, line_space => 4, color => $black, text => $text, ); $wrapbox->set_font(gdMediumBoldFont); $wrapbox->set_font('arial', 12); $wrapbox->set(align => 'left', width => 120); $wrapbox->draw(10,140); $gd->rectangle($wrap_box->get_bounds(10,140), $color); DESCRIPTION
GD::Text::Wrap provides an object that draws a formatted paragraph of text in a box on a GD::Image canvas, using either a builtin GD font or a TrueType font. METHODS
This class doesn't inherit from GD::Text directly, but delegates most of its work to it (in fact to a GD::Text::Align object. That means that most of the GD::Text::Align methods are available for this class, specifically "set_font" and "font_path". Other methods and methods with a different interface are described here: GD::Text::Wrap->new( $gd_object, attribute => value, ... ) Create a new object. The first argument to new has to be a valid GD::Image object. The other arguments will be passed to the set() method for initialisation of the attributes. $wrapbox->set( attribute => value, ... ) set the value for an attribute. Valid attributes are: width The width of the box to draw the text in. If unspecified, they will default to the width of the GD::Image object. line_space The number of pixels between lines. Defaults to 2. para_space, paragraph_space The number of extra pixels between paragraphs, above line_space. Defaults to 0. color, colour Synonyms. The colour to use when drawing the font. Will be initialised to the last colour in the GD object's palette. align, alignment Synonyms. One of 'justified' (the default), 'left', 'right' or 'center'. text The text to draw. This is the only attribute that you absolutely have to set. preserve_nl If set to a true value, newlines in the text will cause a line break. Note that lines will still be justified. If only one word appears on the line, it could get ugly. Defaults to 0. As with the methods, attributes unknown to this class get delegated to the GD::Text::Align class. $wrapbox->get( attribute ); Get the current value of an attribute. All attributes mentioned under the "set()" method can be retrieved $wrapbox->get_bounds() Returns the bounding box of the box that will be drawn with the current attribute settings as a list. The values returned are the coordinates of the upper left and lower right corner. ($left, $top, $right, $bottom) = $wrapbox->get_bounds(); Returns an empty list on error. NOTE: The return list of this method may change in a future implementation that allows angled boxes. $wrapbox->draw(x, y) Draw the box, with (x,y) as the top right corner. Returns the same values as the "getbounds()" method. NOTE: The return list of this method may change in a future implementation that allows angled boxes. NOTES
As with all Modules for Perl: Please stick to using the interface. If you try to fiddle too much with knowledge of the internals of this module, you may get burned. I may change them at any time. You can only use TrueType fonts with version of GD > 1.20, and then only if compiled with support for this. If you attempt to do it anyway, you will get errors. Even though this module lives in the GD::Text namespace, it is not a GD::Text. It does however delegate a lot of its functionality to a contained object that is one (GD::Text::Align). BUGS
None that I know of, but that doesn't mean much. There may be some problems with exotic fonts, or locales and character encodings that I am not used to. TODO
Angled boxes. At the moment, the only bit of the box that is allowed to be unspecified and in fact must be unspecified, is the bottom. If there is enough need for it, I might implement more flexibility, in that that you need to only specify three of the four sides of the box, and the fourth will be calculated. Automatic resizing of a TrueType font to fit inside a box when four sides are specified, or maybe some other nifty things. More flexibility in the interface. Especially draw needs some thought. More and better error handling. Warnings for lines that are too long and stick out of the box. Warning for emptyish lines? COPYRIGHT
copyright 1999 Martien Verbruggen (mgjv@comdyn.com.au) SEE ALSO
GD, GD::Text, GD::Text::Align perl v5.12.1 2003-02-24 Text::Wrap(3)
All times are GMT -4. The time now is 05:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy