Greetings.
I am struggling with a shell script to make my life simpler, with a number of practical ways in which it could be used. I want to take a standard text file, and pull the 'n'th word from each line such as the first word from a text file.
I'm struggling to see how each line can be... (5 Replies)
Hi,
I have text file which contains lines like :
a/a/a/a/.project
b/b/b/b/b/.project
c/c/c/.project
d/.project
e/e/e/e/.project
i want for all lines the last word .project should be removed and the file should look like :
a/a/a/a/
b/b/b/b/b/
c/c/c/
....
how to proceed... (7 Replies)
First I have to say thank you to this community and this forum. You helped me very much builing several useful scripts.
Now, I can't get a solution the following problem, I'm stuck somehow. Maybe someone has an idea.
In short, I dump a site via lynx and pipe the output in a file. I need to... (7 Replies)
Hi,
In my shell script, I am connecting to database and querying multiple columns in a table.
MESSAGE_TEXT=`sqlplus -s /nolog <<end_log_stmt
set heading off
set feedback off
set verify off
set termout off
set pages 0
CONNECT APPS/$USER_PWD
Select order_number, id, error_message... (6 Replies)
Hi I have some problem to cut out the second line in a output file and send to a new file it's a #!/bin/bash script
1 something
2 something
3 something
and after I cut
1 something
3 something
New file
2 something
Thanks in advance (7 Replies)
Hello,
This is my first post on the forums. So I want to start by thanking anyone who is kind enough to read this post and offer advise. I hope to be an active contributor now that I've found these forums.
I have an issue that I figure would be a good first post..
I have 2 text files... (5 Replies)
Can any one help us in finding the the last word of each line from a text file and print it.
eg:
1st --> aaa bbbb cccc dddd eeee ffff ee
2nd --> aab ered er fdf ere ww ww f
the o/p should be a below.
ee
f (1 Reply)
FOLKS ,
i have a text file that is generated automatically of an another korn shell script, i want to bring in the fifth line of the text file in to my korn shell script and look for a particular word in the line . Can you all share some thoughts on this one.
thanks...
Venu (3 Replies)
I am looking at using grep to locate the line in the text file and them use awk to select a word or words out of it.
I know awk needs -v to allow a variable to be used, but also needs -F to allow the break up of the sentence and allow the location of separate variables.
$line = grep "1:" File |... (8 Replies)
Discussion started by: Ironguru
8 Replies
LEARN ABOUT DEBIAN
algorithm::dependency::source::file
Algorithm::Dependency::Source::File(3pm) User Contributed Perl Documentation Algorithm::Dependency::Source::File(3pm)NAME
Algorithm::Dependency::Source::File - File source for dependency heirachys
DESCRIPTION
Algorithm::Dependency::Source::File implements a source where the items are stored in a flat file or a relatively simple format.
File Format
The file should be an ordinary text file, consisting of a series of lines, with each line completely containing the information for a
single item. Blank lines, or lines beginning with the hash character '#' will be ignored as comments.
For a single item line, only word characters will be used. A 'word character' consists of all letters and numbers, and the underscore '_'
character. Anything that is not a word character will be assumed to be a seperator.
The first word will be used as the name or id of the item, and any further words in the line will be used as other items that this one
depends on. For example, all of the following are legal.
# A single item with no dependencies
Foo
# Another item that depends on the first one
Bar Foo
# Depending on multiple others
Bin Foo Bar
# We can use different seperators
One:Two|Three-Four+Five=Six Seven
# We can also use multiple non-word characters as seperators
This&*&^*&File: is& & & :::REALLY()Neat
From the examples above, it should be easy to create your own files.
METHODS
This documents the methods differing from the ordinary Algorithm::Dependency::Source methods.
new $filename
When constructing a new Algorithm::Dependency::Source::File object, an argument should be provided of the name of the file to use. The
constructor will check that the file exists, and is readable, returning "undef" otherwise.
SUPPORT
To file a bug against this module, use the CPAN bug tracking system
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Algorithm-Dependency <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Algorithm-Dependency>
For other comments, contact the author.
AUTHOR
Adam Kennedy <adamk@cpan.org>
SEE ALSO
Algorithm::Dependency
COPYRIGHT
Copyright 2003 - 2009 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.12.4 2009-04-14 Algorithm::Dependency::Source::File(3pm)