10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am trying to write a shell script to help with some digital signature work currently being undertaken where we have a file that contains a number of rows ending with ^M.
What I need to do is concatenate this using shell scripting and retain the control character. E.G.
abc^M... (5 Replies)
Discussion started by: chris01010
5 Replies
2. Shell Programming and Scripting
I want to read a file -line by line which consists of the following statements
Chr18:4000-4010
Chr20:4020-4030
Chr15:8000-8050
Pls. give a expression to read the line like this from a file
Chr18:4000-4010
the given two replies reading like that
Chr18:-10
but it is important to... (2 Replies)
Discussion started by: hravisankar
2 Replies
3. UNIX and Linux Applications
In LVM I have one volume grp and it has two logical volumes A and B and both are full,so I extended my volume grp to 1GB with another hard disk and add this space to A and put my resr data .Now problem is that I get data from first hard disk only but I m unable to find data which is in second hard... (0 Replies)
Discussion started by: Rahul chauhan
0 Replies
4. Shell Programming and Scripting
How do I filter only comments and still keep Line breaks at the end of the line!?
This is one of the common tasks we all do,, How can we do this in a right way..!?
I try to ignore empty lines and commented lines using following approach.
test.sh
# \040 --> SPACE character octal... (17 Replies)
Discussion started by: kchinnam
17 Replies
5. Shell Programming and Scripting
Hi Guys,
I am having a file which does not have any name when i do a ls -l
-rw-r--r-- 1 dctrdat1 dctrdata 35 Feb 09 08:04
-rw-r--r-- 1 dctrdat1 dctrdata 11961 Feb 08 06:40 DAI_data.txt
Now i want to see what is inside that file. Can you please let me know how to read... (9 Replies)
Discussion started by: mac4rfree
9 Replies
6. Shell Programming and Scripting
Can anyone tell me how to read a file in perl having junk characters . I have only one junk character which is repeated many times in the file. While i'm reading and printing the file , it is displaying till the 1st occurence of that junk character and rest of the file is not being read. (1 Reply)
Discussion started by: k_surya
1 Replies
7. Shell Programming and Scripting
i need to read record by record i use script
#!/bin/ksh
for i in 'cat filename'
do
echo $1
done
but i dont get expected result
i just get filename echoed on screen (4 Replies)
Discussion started by: er_zeeshan05
4 Replies
8. UNIX for Advanced & Expert Users
I am not able to receive the message on socket in the current process when its waiting for its child to exit.
code looks something like below
//in one thread of the current process
//thread 1
===============================================
int numBytes = read(sockid,buf,SIZE); //Now the... (2 Replies)
Discussion started by: swap007
2 Replies
9. Programming
We have to convert a sequential file to a 80 char line sequential file (HP UX platform).The sequential file contains special characters. which after conversion of the file to line sequential are getting coverted into "new line" or "tab" and file is getting distorted. Is there any way to read these... (2 Replies)
Discussion started by: Rajeshsu
2 Replies
10. Shell Programming and Scripting
Hello,
I am new to shell scripting, and I am trying to create a script that reads an input like the following
firstname:lastname:age
firstname:lastname:age
firstname:lastname:age
in a text file. I have a 2 part question. First how do I open the file in a shell script. And then how can... (7 Replies)
Discussion started by: TexasGuy
7 Replies
KNEWSD(1) General Commands Manual KNEWSD(1)
NAME
knewsd - a tiny nntp demon
SYNOPSIS
knewsd [ options ]
DESCRIPTION
Knewsd is intended to be used with knews(1) to read news (in)directly from the spool directory or even from a mail folder hierarchy. It
reads NNTP commands from standard input and writes replies to standard output. The following commands are implemented:
ARTICLE [number]
BODY [number]
HEAD [number]
Return the head and/or body of the current or the specified article. Message-id lookups are not supported.
GROUP newsgroup
Enters the given newsgroup.
HELP
Gives a list of the implemented commands.
LIST [active | newsgroups]
Lists the active file or the newsgroups file.
NEXT
Changes the current article pointer to the next article
POST
Post an article via the specified posting agent. If none has been specified, the reply will be '440 Posting not implemented.'
QUIT
Makes knewsd exit.
STAT number
Sets the current article pointer.
XOVER range
Returns the overview data for the specified range of articles.
Knewsd implements the 'xover' command either by using the overview files if present, or creating overview records on the fly, or a combina-
tion of both if the overview file is incomplete. In the latter case, if the -update flag is given, knewsd will update the overview files.
OPTIONS
There is no need to spell out the entire option name, it is sufficient to give a unique prefix, such as -a for -active.
-spool directory
This is the spool directory. It must be specified, either at compile time or at run time.
-active file
This is the active file containing the newsgroups and the high and low article counts. If this is not specifed, knews must be told
not to try to read the active file.
-newsgroups file
This is the newsgroups file containing the group descriptions. It's entirely optional.
-overview dir
This can be used if the overview files reside in a different directory hierarchy than the spool directory.
-update
If this is set, knewsd will (try to) update any incomplete overview files it encounters. Not a good idea if you're reading a system
wide spool directory.
-postingagent agent
If this is set, the 'agent' will be used to post articles. A possible agent is 'exec inews -h'. This command is interpreted by the
shell, and it is important that it is exec'ed, so that knewsd may kill it on a broken pipe to prevent posting of duplicate or trun-
cated articles. Knewsd will warn about this on startup.
AUTHOR
This software is Copyright 1995, 1996 by Karl-Johan Johnsson.
SEE ALSO
knews(1), inews(1)
1996 KNEWSD(1)