Hi,
I want to write a shell script which increments a particular column in a row from a text file and then adds another row below the current row with the incremented value .
For Eg .
if the input file has a row :
abc xyz lmn 89 lm nk o p
I would like the script to create something like... (9 Replies)
Is there anyway to use awk to add a first column to my data that automatically goes from 1 to n , where n is the numbers of my rows?:confused: (4 Replies)
Hello,
I have an input file like the following:
11_3_4
2_1_35
3_15__
_16989
Where '_' is a space. The data is in a table. Is there a way for the program to prompt the user for x1,y1 and x2,y2, where x1,y1 is the desired number (for example x=6 y=4 is a value of 4) and move to a desired spot... (2 Replies)
Hi Team,
I am trying to add timestamp to SQLs by taking the timestamp in variable through shell script.I started like this.
cat << EOF > $MYDIR
CONNECT TO $MYDB USER $MYUSR USING $MYPWD;
T=`db2 -x "select CURRENT_TIMESTAMP from sysibm.sysdummy1 "`;
DECLARE RECCUR CURSOR FOR... (3 Replies)
Hi Friends,
I have a single column data like below.
1
2
3
4
5
I need the output like below.
0
1
2
3
4
where each row (including first row) subtracting from first row and the result should print below like the way shown in output file.
Thanks
Sid (11 Replies)
Hi,
I would like to add a new column containing the row numbers to a text file. How do I go about doing that? Thanks!
Example input:
A X
B Y
C D
Output:
A X 1
B Y 2
C D 3 (5 Replies)
I have a table with this structure:
cola colb colc
1 19 lemon
20 31 lemon
32 100 lemon
159 205 cherries
210 500 cherries
and need to parse it into this format:
cola colb colc
1 100 lemon
159 500 cherries
So I need the first row of cola and the last row of colb if colc has the... (3 Replies)
Gents,
Transpose from row to column, taking in consideration the first column, which contends the date.
Input file
72918,111000009,111000009,111000009,111000009,111000009,111000009,111000009,111000009,111000009
72918,2356,2357,2358,2359,2360,2361,2362,2363,2364
72918,0,0,0,0,0,0,0,0,0... (12 Replies)
Discussion started by: jiam912
12 Replies
LEARN ABOUT DEBIAN
statnews
STATNEWS(1) Debian GNU/Linux Manual STATNEWS(1)NAME
statnews - generate some useful statistics out of a newsgroup
SYNOPSIS
statnews [OPTIONS] NEWSGROUP
DESCRIPTION
The statnews command get some useful statistics out of a newsgroup. It displays things like how many articles each author posted, how many
characters was written, how many lines were quoted, how many articles belong to each thread, the number of messages/characters per day, the
average message length, and so on.
OPTIONS
--capitalize(*)
Whether to capitalize the name of both the sender and the receiver of each message (default is "--capitalize": yes). This option is
useful to collect "AUTHOR" together with "author", "Author", and "AuThor".
--dotted(*)
Whether to translate "." to "/" in NEWSGROUP (default is "--nodotted": does translate). This option may be useful if your system
stores each newsgroup in a dedicate directory (e.g., news.useless.group) instead that by hierarchy (e.g., news/useless/group), or if
your system has a news archive stored this way.
--from=DATE
Set the date statistics start from (DATE format is "dd/mm/yyyy", GMT).
--help
Display the help summary.
--spooldir=SPOOLDIR
Search NEWSGROUP in SPOOLDIR (default is /var/spool/news/articles/).
--to=DATE
Set the date statistics end by (DATE format is "dd/mm/yyyy", GMT).
--width=WIDTH
Set the terminal width to WIDTH columns (default is 80, with a minimum of 70).
Options may be conveniently abbreviated and prefixed by "-" instead of "--"; the "=" may be omitted or substituted with one or more blanks.
Options listed with (*) may be negated by adding the prefix "no" in front of them (e.g., "--dotted" => "--nodotted").
RETURN VALUE
The statnews command returns 0 on success and a positive integer on errors.
ENVIRONMENT
The environment variable STATNEWS can hold a set of default options for statnews.
These options are interpreted first by the program and can be overridden by explicit command line parameters. For example:
sh: "STATNEWS="--nocapital --width=132"; export STATNEWS"
csh:
"setenv STATNEWS "--nocapital --width=132""
FILES
The default spool directory is /var/spool/news/articles/.
SEE ALSO rn(1), readnews(1).
BUGS
There are no known bugs.
UNRESTRICTIONS
This program is copylefted. Refer to the GNU General Public License for conditions of use.
AUTHOR
This program has been written and is actively maintained by Davide Giovanni Maria Salvetti <salve@debian.org>.
HISTORY
This program was originally aimed for use with FidoNet style echo areas under Debian GNU/Linux. It can be successfully used with Usenet
newsgroups as well. More precisely, it can be used with every message base that stores one message per file in some directory in
traditional mbox format.
Debian Project 2011-12-25 STATNEWS(1)