Hi everybody:
Could anybody tell me how I can print from a file a selected rows with awk. In my case I only want print in another file all the rows from NR=8 to NR=2459 and the increment each 8 times.
I tried to this:
awk '{for (i=8; i=2459; i+=8); NR==i}' file1 > file2
But doesn't... (6 Replies)
Hi,
I required to print all rows into columns(some comma separated or else) till a pattern match found. Using Solaris UNIX scripting
my input is like
abc
def
ghi
jkl
mno
END
pqr
stu
vwx
yz
123
END
...
... (7 Replies)
Hi all,
I have a file im reading with a for loop using:
for i in $(cat filename)
do
etc.
done
the original file is 3 columns, this method prints it out into 3 rows, and i would like to just assign the first to rows (originally first two columns) to separate variables. What would be... (3 Replies)
First time poster, but the forum has saved my bacon more times than... Lots.
Anyway, I have a text file, and wanted to use Awk (or any other sensible program) to print out overlapping sections, or arbitrary length. To describe by example, for file
1
2
3
4
5
etc...
I want the out put... (3 Replies)
Dear All,
I have a data file input.csv like below. (Only five column shown here for example.)
Data1,StepNo,Data2,Data3,Data4
2,1,3,4,5
3,1,5,6,7
3,2,4,5,6
5,3,5,5,6
From this I want the below output
Data1,StepNo,Data2,Data3,Data4
2,1,3,4,5
3,1,5,6,7
where the second column... (4 Replies)
I have this in a file
11.22.33.44
yyyyyyuser
With awk/sed, I need this to be output as follows
alias server.domain.com='ssh yyyyyyuser@11.22.33.44' (4 Replies)
For below lines in a file.
68078971 dance routine (jess far back corner) 13902786
368079527 dance routine 13902786
368081191 dance routine (jess far back) 13902786
I am looking for output as below
68078971, "dance routine (jess far back corner)", 13902786... (4 Replies)
Hi
Does anyone know of an efficient way to index a column of data in file2 to print the coresponding row in file1 which corresponds to the data in file2 AND 30 rows preceding and after the row in file1.
For example suppose you have a list of numbers in file2 (single column) as follows:... (6 Replies)
Discussion started by: Geneanalyst
6 Replies
LEARN ABOUT CENTOS
quot
QUOT(8) System Manager's Manual QUOT(8)NAME
quot - summarize filesystem ownership
SYNOPSIS
quot [ -acfguvi ] [ filesystem... ]
DESCRIPTION
quot displays the number of kilobytes in the named filesystem currently owned by each user or group. Note that this utility currently works
only for XFS.
OPTIONS -a Generate a report for all mounted filesystems giving the number of kilobytes used by each user or group.
-c Display three columns giving file size in kilobytes, number of files of that size, and cumulative total of kilobytes in that size or
smaller file. The last row is used as an overflow bucket and is the total of all files greater than 500 kilobytes.
-f Display count of kilobytes and number of files owned by each user or group.
-g Report on groups.
-u Report on users (the default).
-v Display three columns containing the number of kilobytes not accessed in the last 30, 60, and 90 days.
-i Ignore mountpoints mounted by automounter.
-T Avoid truncation of user names longer than 8 characters.
-q Do not sort the output.
FILES
/etc/mtab mounted filesystem table
/etc/passwd default set of users
/etc/group default set of groups
SEE ALSO du(1), ls(1).
BUGS
Currently, only the XFS filesystem type is supported.
QUOT(8)