11-20-2010
This program opens file named "./testfile2" for writing.
five times it writes: "Output 1 \n" to this file. Note that it doesn't append to it because of this: ">" it wipes all data and then writes to it. if you want to append to it use: ">>".
The last three lines are trivial.
This User Gave Thanks to majid.merkava For This Post:
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
can i do this? i am learning this on my own..and from the book..simple unix i am not sure if the syntax would work
if
statement
then
statement
do or for or while
statement
done
else
statement
fi....
I dont know how else to explain that...I hope I... (2 Replies)
Discussion started by: jonas27
2 Replies
2. Shell Programming and Scripting
hi everyone,
i am learning CGI using Perl, but i am having problem to compile and run the scripts.
the thing is that, when i want to compile my scripts i have to get connected to the internet and have to upload the scripts to a server and then only i can compile and run my scripts.
so, can... (2 Replies)
Discussion started by: shifan
2 Replies
3. Shell Programming and Scripting
Does anyone know where I might be able to download the exercises from the learning perl 3rd edition book. Any URL's would be valuable! Thanks:confused: (1 Reply)
Discussion started by: bilal_aa
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
It is very urgent.
Pls guide me in learning Perl Module and the Packages.
Eventhough i tried in the google, I didnt get upto my expectations.
Pls guide me how to create , build Module and the package.
Many Thanks. (3 Replies)
Discussion started by: Yamini Thoppen
3 Replies
5. Shell Programming and Scripting
Can anyone suggest a good pearl book?:) (2 Replies)
Discussion started by: nygenka
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
i have started to learn unix (on and off for the past few months) and am wishing to move into that area in the administration field of it.
I have been working in the help desk area (desktop support - windows based) for about 2.5 years and moved into a team leading role for 1 year in which i... (1 Reply)
Discussion started by: donnieDarko
1 Replies
7. Shell Programming and Scripting
Seems like it's written out pretty well for a beginner to learn, any thoughts or recommendations for other books? I'd post the link but I can't do that yet.
The book is called "Beginning Perl" by Simon Cozens (2 Replies)
Discussion started by: budfoxcat
2 Replies
8. Shell Programming and Scripting
Good afternoon,
I am not trying to start a debate. Please don't take it that way. I'm not trying to make this a Perl versus Bash scripts thing.
I have been writing shell scripts for several years. I am not 100%, but I seem to get the job done. I would like to start focusing on spending... (11 Replies)
Discussion started by: brianjb
11 Replies
9. UNIX for Dummies Questions & Answers
Hello All,
I am actually learning PERL and more interested to learn CGI script too. Can any suggest a forum or weblink which is more helpful for a dummy CGI developer.
Thanks (6 Replies)
Discussion started by: posix
6 Replies
LEARN ABOUT DEBIAN
filechan
FILECHAN(8) System Manager's Manual FILECHAN(8)
NAME
filechan - file-writing backend for InterNetNews
SYNOPSIS
filechan [ -d directory ] [ -f fields ] [ -m mapfile ] [ -p pidfile ]
DESCRIPTION
Filechan reads lines from standard input and copies certain fields in each line into files named by other fields within the line. Filechan
is intended to be called by innd(8) as a channel feed. (It is not a full exploder and does not accept commands; see newsfeeds(5) for a
description of the difference and buffchan(8) for an exploder program.)
Filechan input is interpreted as a set of lines. Each line contains a fixed number of initial fields, followed by a variable number of
filename fields. All fields in a line are separated by whitespace. The default number of initial fields is one.
For each line of input, filechan writes the initial fields, separated by whitespace and followed by a newline, to each of the files named
in the filename fields. When writing to a file, filechan opens it in append mode and tries to lock it and change the ownership to the user
and group who owns the directory where the file is being written.
OPTIONS
-f The ``-f'' flag may be used to specify a different number of fields.
-d By default, filechan writes its arguments into the directory /var/spool/news/out.going. The ``-d'' flag may be used to specify a
directory the program should change to before starting.
-p If the ``-p'' flag is used, the program will write a line containing its process ID (in text) to the specified file.
If filechan is invoked with ``-f 2'' and given the following input:
news/software/b/132 <1643@munnari.oz.au> foo uunet
news/software/b/133 <102060@litchi.foo.com> uunet munnari
comp/sources/unix/2002 <999@news.foo.com> foo uunet munnari
Then the file foo will have these lines:
news/software/b/132 <1643@munnari.oz.au>
comp/sources/unix/2002 <999@news.foo.com>
the file munnari will have these lines:
news/software/b/133 <102060@litchi.foo.com>
comp/sources/unix/2002 <999@news.foo.com>
and the file uunet will have these lines:
news/software/b/132 <1643@munnari.oz.au>
news/software/b/133 <102060@litchi.foo.com>
comp/sources/unix/2002 <999@news.foo.com>
Because the time window in which a file is open is very small, complicated flushing and locking protocols are not needed; a mv(1) followed
by a sleep(1) for a couple of seconds is sufficient.
-m A map file may be specified by using the ``-m'' flag. Blank lines and lines starting with a number sign (``#'') are ignored. All
other lines should have two host names separated by a colon. The first field is the name that may appear in the input stream; the
second field names the file to be used when the name in the first field appears. For example, the following map file may be used to
map the short names above to the full domain names:
# This is a comment
uunet:news.uu.net
foo:foo.com
munnari:munnari.oz.au
HISTORY
Written by Robert Elz <kre@munnari.oz.au>, flags added by Rich $alz <rsalz@uunet.uu.net>. This is revision 1.19, dated 1996/10/29.
SEE ALSO
buffchan(8), innd(8), newsfeeds(5).
FILECHAN(8)