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
CGI::Application::Plugin::JSON(3pm)			User Contributed Perl Documentation		       CGI::Application::Plugin::JSON(3pm)

NAME
CGI::Application::Plugin::JSON - easy manipulation of JSON headers SYNOPSIS
use CGI::Application::Plugin::JSON ':all'; # add_json_header() is cumulative $self->add_json_header( foo => 'Lorem ipsum...'); $self->add_json_header( bar => [ 0, 2, 3, 4 ] ); $self->add_json_header( baz => { stuff => 1, more_stuff => 2 } ); # json_header() is not cumulative $self->json_header( foo => 'Lorem ipsum...'); # in case we're printing our own headers print "X-JSON: " . $self->json_header_string(); # clear out everything in the outgoing JSON headers $self->clear_json_header(); # or send the JSON in the document body $self->json_body( { foo => 'Lorem ipsum', bar => [ 0, 2, 3 ] } ); # send the JSON back in the document body, but execute it using a Javascript callback $self->json_callback('alert', { foo => 'Lorem ipsum', bar => [ 0, 2, 3 ] } ); DESCRIPTION
When communicating with client-side JavaScript, it is common to send data in "X-JSON" HTTP headers or through the document body as content- type "application/json". This plugin adds a couple of convenience methods to make that just a little bit easier. HEADER METHODS
json_header This method takes name-value pairs and sets them to be used in the outgoing JSON. It is not cummulative and works similarly to "header_props". Use it only if you have all of the values up front. In most cases add_json_header is probably what you want. # only the 2nd call will actually set data that will be sent $self->json_header( foo => 'Lorem ipsum...'); $self->json_header( bar => [ 0, 2, 3, 4 ] ); add_json_header This method takes name-value pairs and sets them to be used in the outgoing JSON. It is cummulative and works similarly to "header_add"; meaning multiple calls will add to the hash of outgoing values. # both 'foo' and 'bar' will exist in the hash sent out $self->json_header( foo => 'Lorem ipsum...'); $self->json_header( bar => [ 0, 2, 3, 4 ] ); clear_json_header This method will remove anything that was previously set by both json_header and add_json_header. This means that no "X-JSON" header will be sent. json_header_string This method will create the actual HTTP header string that will be sent to the browser. This plugin uses it internally to send the header, but it might be useful to use directly if you are printing your own HTTP headers (using a "header_type" of "none"). $self->header_type('none'); print $self->json_header_string(); json_header_value This method will return the values being sent in the JSON header. If you pass in the key of the value you want, you will get just that value. Else all name-value pairs will be returned. my $value = $self->json_header_value('foo'); my %values = $self->json_header_value(); BODY METHODS
json_body This method will take the given Perl structure, turn it into JSON, set the appropriate content-type, and then return the JSON. return $self->json_body({ foo => 'stuff', bar => [0,1,2,3]} ); json_callback This method will take the given Perl structure, turn it into JSON, set the appropriate content-type, and then return a Javascript snippet where the given callback is called with the resulting JSON. return $self->json_callback('alert', { foo => 'stuff', bar => [0,1,2,3]} ); # would result in something like the following being sent to the client alert({ foo => 'stuff', bar => [0,1,2,3]}); MISC METHODS
to_json This method is just a convenient wrapper around JSON::Any's "encode". from_json This method is just a convenient wrapper around JSON::Any's "decode". AUTHOR
Michael Peters, "<mpeters@plusthree.com>" BUGS
Please report any bugs or feature requests to "bug-cgi-application-plugin-viewsource@rt.cpan.org", or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CGI-Application-Plugin-JSON <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CGI-Application- Plugin-JSON>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. COPYRIGHT &; LICENSE Copyright 2006 Michael Peters, All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.4 2011-11-11 CGI::Application::Plugin::JSON(3pm)
All times are GMT -4. The time now is 06:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy