11-28-2010
@scrutinizer:
Thanks for your answer again. One more thing, can p{$1=$1;print} be "read" like if p is true then print $1=$1 ?
I followed your previous link and I understand your command but why can we do $2=$2, $3=3 etc but not $0=0 ?
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear Friends,
I need a shell script.
I am facing a problem while selecting the text that is between start and end tags. and insert the paragraph into a file1, next paragraph in file2......
experts please help.
i have a file which contains,
--------------
<abc> 111some text some text
some... (2 Replies)
Discussion started by: swamymns
2 Replies
2. Shell Programming and Scripting
Hi all,
For a intro UNIX course I'm taking, I need to use the command "tr" to display a file on standard output without any newlines (all on one line).
I assume I would start with "cat filename | tr" but don't know what to put after tr.
Any ideas would be lovely!
Thanks. (3 Replies)
Discussion started by: otes4
3 Replies
3. Shell Programming and Scripting
I have a file that contains the following lines
the brown quick fox
jumped over
the white laze dog
0123456789
I wanted to put the contents of this file into a variable so I used this code:
VAR_LIST=`cat $2`
where $2 is the file name passed as an argument to the script
If I... (3 Replies)
Discussion started by: Nomaad
3 Replies
4. Shell Programming and Scripting
Hi,
I have to search those statements from the file which starts from "shanky"(only shanky, shanky09 or 09shanky is not allowed) and ends with ");". These two string can be in a same line or different line. And also i have to negate those lines which starts with #.
Can any one please give me... (2 Replies)
Discussion started by: shanky09
2 Replies
5. Shell Programming and Scripting
Hi,
I have a requirement to search for a string in a large log file along with few lines before and after the the string. The following script was sufficient to search such an entry.
STRING_TO_GREP="$1"
FILE_TO_GREP="$2"
NUMBER_OF_LINES_BEFORE=$3
NUMBER_OF_LINES_AFTER=$4
for i in `grep... (3 Replies)
Discussion started by: praveen123
3 Replies
6. Shell Programming and Scripting
Hi all,
i'm new to this community. I am trying to write a script which will fetch ftp completion time of a file from a paragraph of a big text file ( which contains multiple paragraphs) . Each paragraph will have ftp details..
Now I dont know how to fetch process time within a paragraph of... (3 Replies)
Discussion started by: prachiagra
3 Replies
7. Shell Programming and Scripting
hey guys,
I tried searching but most 'search and replace' questions are related to one liners.
Say I have a file to be replaced that has the following:
$ cat testing.txt
TESTING
AAA
BBB
CCC
DDD
EEE
FFF
GGG
HHH
ENDTESTING
This is the input file: (3 Replies)
Discussion started by: DeuceLee
3 Replies
8. Shell Programming and Scripting
This is for AIX 6.1, I've a flat file and the format is like this
DECLARE
some statements;
BEGIN
some statements;
END;
I've to search BEGIN and replace it with the following 4 lines
BEGIN
For x in 1..1
LOOP
BEGIN
Similarly I've to search END and replace it with the... (7 Replies)
Discussion started by: Mukul Sharma
7 Replies
9. Shell Programming and Scripting
how to find multiple lines in to multiple files if matched lines then do
f1 f2 f3 are files ,lines contain matched lines
f1
asdasdasdasd
asdasdasdasd
abc
def
Business date cannot be as of date
ghi
sdasdasdasda
asdasdasdada
f2 (1 Reply)
Discussion started by: Kalia
1 Replies
LEARN ABOUT DEBIAN
cgi::extratags
Extratags(3pm) User Contributed Perl Documentation Extratags(3pm)
NAME
CGI::Extratags - Useful Extensions for the CGI Module
SYNOPSIS
use CGI::Extratags;
$cgi = new CGI::Extratags;
print $cgi -> email ('racke@linuxia.de');
print $cgi -> jump ('CONTACT', 'contact us');
print $cgi -> mark ('CONTACT', $cgi -> h2 ('How to contact us'));
print $cgi -> row ('Date', 18, 1, 1966);
print $cgi -> recall ('Debian CD', artnum => '0-123456');
DESCRIPTION
CGI::Extratags adds several useful methods to the CGI class.
email ADDRESS
print $cgi -> email ('racke@linuxia.de');
Produces HTML code for a link to an email ADDRESS.
jump MARK TEXT
print $cgi -> jump ('CONTACT', 'contact us');
Produces HTML code for a link pointing to a target within the current document.
mark NAME TEXT
print $cgi -> mark ('CONTACT', $cgi -> h2 ('How to contact us'));
Generates target NAME for hyperlinks.
row [ITEM ...]
print $cgi -> row ('Date', 18, 1, 1966);
Produces HTML code for a table row with ITEM arguments as cell contents.
recall TEXT [NAME [VALUE]] ...
foreach my $num (sort (keys %artmap))
{
print $cgi -> recall ($artmap{$num}, artnum => $num);
print $cgi -> br;
}
Produces a link to the script itself labeled with TEXT. The NAME/VALUE pairs will be passed as parameters.
AUTHOR
Stefan Hornburg, racke@linuxia.de
SEE ALSO
perl(1), URI::Escape(3), CGI(3).
perl v5.8.4 2004-07-11 Extratags(3pm)