Sponsored Content
Top Forums Shell Programming and Scripting Content of Content of a variable! Post 302133859 by jaduks on Monday 27th of August 2007 12:40:02 AM
Old 08-27-2007
Navojit, that worked for me :-) Thanks a lot
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to replace a variable content

Hi, variable1="This is a car" Now I want to replace the content of variable1, "car" to "dog". Is there any simple command I can use. Thanks. Joseph (4 Replies)
Discussion started by: josephwong
4 Replies

2. Shell Programming and Scripting

Content of variable

I have a variable that contains filenames like this: variable="file_1.extension<blank>file_2.extension<blank>file_3.extension<blank>file_4.extension and so on" How can I make filenames to be separated by newline: (I tried Sed but it didn't worked well) file_1.extension file_2.extension... (6 Replies)
Discussion started by: MartyIX
6 Replies

3. UNIX for Dummies Questions & Answers

How to assign the content of a file to a variable?

Hi all, I have a problem here. I have a file and let we take the content of the file is just '32' (only a numeric value in that file). Now I need to assign this numeric value ( value in that file) to a variable. Is that possible? If so, can you plz advice me on this? Thanks in... (4 Replies)
Discussion started by: iamgeethuj
4 Replies

4. Shell Programming and Scripting

addressing variable content...

I want to address a variable content whose name is/matches the content of a given other variable. i.e. set name=´sam´ set ${name}_age=´27´ So, by typing: echo ${name}_age I correctly obtain: sam_age By typing: echo $sam_age or echo ${sam_age} I correctly obtain: 27 But how can I... (3 Replies)
Discussion started by: sobolev
3 Replies

5. Shell Programming and Scripting

how to get the specified content of the text into a variable.

I am having one string like ./usr1/Server/temp/app.env ./usr1/Server/temp/upp/app.env ./usr1/Server/ORIG_temp/app.env ./usr1/Server/ORIG_temp/upp/app.env ./usr1/Server/work_temp_40/app.env ./usr1/Server/work_temp_40/upp/app.env ./usr1/fd/app.env ./usr1/PurgeArchive/app.env ./usr1/bm/bin/app.env... (6 Replies)
Discussion started by: dineshmurs
6 Replies

6. Shell Programming and Scripting

Help with remove duplicate content and only keep the first content detail

Input data_10 SSA data_2 TYUE data_3 PEOCV data_6 SSAT data_21 SSA data_19 TYUEC data_14 TYUE data_15 SSA data_32 PEOCV . . Desired Output data_10 SSA data_2 TYUE data_3 PEOCV data_6 SSAT data_19 TYUEC (9 Replies)
Discussion started by: patrick87
9 Replies

7. Shell Programming and Scripting

Loop over variable content

Hello all, I do have a variable containing one line like this: Waiting for job XXXXXX to start I needed to get the 'XXXXXX' literal, so I did the following: job_interno=`echo $log_exec | sed 's/.*Waiting for job \(*\).*/\1/' ` #other stuff Now, my variable is have more... (5 Replies)
Discussion started by: manolain
5 Replies

8. Shell Programming and Scripting

Facing issues with Content-Type:application/x-download Content-Disposition:attachment

I am in the process of developing a perl cgi page. I had succeeded in developing the page but there are few errors/issues with the page. description about cgi page: My CGI page retrieves all the file names from an directory and displays the files in drop down menu for downloading the... (5 Replies)
Discussion started by: scriptscript
5 Replies

9. UNIX for Dummies Questions & Answers

Getting ls content into a file using variable

hi i just cant figure out how can i do this ls -lt > log.txt using $PWD what i mean is how can i get the ls command content into a file using $PWD variable? :confused: (4 Replies)
Discussion started by: chinababy
4 Replies

10. Shell Programming and Scripting

Replacement of variable by their content in a file

Dear all, I have a "SQL request" in a file: that request include different "host variable" and I would like to substitute the different "host variable" by their respective content before executing the request. For example: $ echo $SHELL /bin/bash $ cat dae2.txt DELETE FROM ... (11 Replies)
Discussion started by: dae
11 Replies
Test::Pod::Content(3pm) 				User Contributed Perl Documentation				   Test::Pod::Content(3pm)

NAME
Test::Pod::Content - Test a Pod's content SYNOPSIS
use Test::Pod::Content tests => 3; pod_section_is 'Test::Pod::Content' , 'NAME', "Test::Pod::Content - Test a Pod's content", 'NAME section'; pod_section_like 'Test/Pod/Content.pm', 'SYNOPSIS', qr{ use s Test::Pod::Content; }xm, 'SYNOPSIS section'; pod_section_like 'Test/Pod/Content.pm', 'DESCRIPTION', qr{ Test::Pod::Content s provides s the }xm, 'DESCRIPTION section'; DESCRIPTION
This is a very simple module for testing a Pod's content. It is mainly intended for testing the content of generated Pod - that is, the Pod included in perl modules generated by some mechanism. Another usage example is to test whether all files contain the same copyright notice: plan tests => scalar @filelist; for my $file (sort @filelist) { pod_section_like( $file, 'LICENSE AND COPYRIGHT', qr{ This s library s is s free s software. s You s may s distribute/modify s it s under s the s same s terms s as s perl s itself }xms, "$file License notice"); } See the files in the t/ directory for live examples. Test::Pod::Content has a very simple concept of Pods: To Test::Pod::Content, a Pod is separated into section. Each section starts with a =head(1|2|3|4) directive, and ends with the next =head, or with the end of the document (=cut). This is a very drastic simplification of Pod's document object model, and only allows for coarse-grained tests. Test::Pod::Content provides the following subroutines for testing a Pod's content: SUBROUTINES
/METHODS pod_section_is pod_section_is $file, $section, $content, $comment; Tests whether a Pod section contains exactly the text given. Most useful for testing the NAME section. You probably want to use pod_section_like for all other sections. $file may either be a filename (including path) or a module name. Test::Pod::Content will search in @INC for the file/module given. pod_section_like pod_section_like $file, $section, qr{ use s Test::Pod::Contents }xm, $comment; Tests whether the text in a Pod section matches the given regex. Be sure to include the m / s regex qualifier if you expect your Pod section to span multiple lines. $file may either be a filename (including path) or a module name. Test::Pod::Content will search in @INC for the file/module given. BUGS AND LIMITATIONS
o Performance Every call to a pod_section_* method searches for the file in question in @INC and parses it from its start. This means that every test requires a Pod parser run, which is quite inefficient if you conduct a big number of tests. o Pod Syntax Test::Pod::Coverage may report wrong test results if your pod is not syntactically correct. You should use Test::Pod to check your Pod's syntax. DEPENDENCIES
Test::More Pod::Simple version INCOMPATIBILITIES
None known SEE ALSO
Test::Pod for testing your POD's validity Test::Pod::Coverage for checking wether your pod is complete Pod::Tests, Test::Pod::Snippets and Pod::Snippets for extracting and executing tests from a POD (If you plan doing so, here's a little brain-train: Which of the tests in this module's "SYNOPSIS" section would fail if you extracted and executed it?). LICENSE AND COPYRIGHT
Copyright 2007 Martin Kutter. This library is free software. You may distribute/modify it under the same terms as perl itself AUTHOR
Martin Kutter <martin.kutter fen-net.de> REPOSITORY INFORMATION
$Id: Content.pm 505 2008-06-22 09:54:54Z kutterma $ $Revision: 505 $ $Source: a $ $Date: 2008-06-22 11:54:54 +0200 (So, 22 Jun 2008) $ $HeadURL: http://svn.hyper-framework.org/Hyper/Test-Pod-Content/trunk/lib/Test/Pod/Content.pm $ perl v5.12.4 2011-11-09 Test::Pod::Content(3pm)
All times are GMT -4. The time now is 08:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy