hi friends!
i have a script where a execute a veritas command, available_media wich retrieves me a list of tapes .lst
then i execute
cat /tmp/listtapes.lst | grep -v VL |sed '/^$/d'|awk -F, '{print $1, $3, $4, $9}
' > /tmp/media1.lst
but it prints all the columns instead of the four... (3 Replies)
I have a one-line command,
lsusb | awk '{ $1=""; $2=""; $3=""; $4=""; $5=""; $6=""; print $0 }'
It works, and gives the results I expect, I was just wondering if I am missing some easier way to nullify the first 6 column variables?
Something like,
lsusb | awk '{ $(1-6)=""; print $0 }'
But... (10 Replies)
Hi all,
My input file is :
0 13400000 sil
13400000 14400000 a
14400000 14900000 dh
14900000 15300000 a
15300000 16500000 R
16500000 17000000 k
17000000 17300000 u
17300000 17600000 th
17600000 17900000 sil
17900000 18400000 th
18400000 18900000 a
18900000 19600000 g
19600000 19900000... (1 Reply)
Hi guys,
I have hundreds file like this, here I only show two of them:
file 1
feco4_s_BB95.log ZE_1=-1717.5206260
feco4_t_BB95.log ZE_1=-1717.5169250
feco5_s_BB95.log ZE_1=-1830.9322060... (11 Replies)
I am working on a file with several columns as below
MO_NAME,FAULT_TYPE,CLASS,CODE1,CODE2,CODE3
RXOCF-101,BTS INTERNAL,FAULT CODES CLASS 2A,53,58
RXOCF-101,BTS INTERNAL,FAULT CODES CLASS 2B,24
RXOCF-101,BTS INTERNAL,FAULT CODES CLASS 2A,33
RXOCF-101,BTS INTERNAL,FAULT CODES CLASS 2D,57 ... (12 Replies)
Hello, I have two tab files with headers
File1: with 4 columns
header1 header2 header3 header4
44 a bb 1
57 c ab 4
64 d d 5
File2: with 26 columns
header1.. header5 header6 header7 ... header 22...header26
id1 44 a bb
id2 57 ... (6 Replies)
Hi everybody,
I have file 1 with 15 columns, I want to change the formatting of the numbers of columns 10,11 and 12 in the scientific notation.
I used the Following script:
awk '{print $10}' file1.dat | awk '{printf "%.2e\n", $1}' > file2.dat
awk '{print $11}' file1.dat | awk '{printf... (7 Replies)
Hi,
I'm trying to copy and paste the sixth column from a bunch of files into a single file having each column pasted in separate columns (and not one after each other in just one column.)
I tried this code but works only partially because it copied and pasted 50 rows of each column... (6 Replies)
Hi All,
i am trying to print required multiple columns dynamically from a fie.
But i am able to print only one column at a time.
i am new to shell script, please help me on this issue.
i am using below script
awk -v COLT=$1 '
NR==1 {
for (i=1; i<=NF; i++) {
... (2 Replies)
Discussion started by: balu1234
2 Replies
LEARN ABOUT MINIX
grep
GREP(1) General Commands Manual GREP(1)NAME
grep - search a file for lines containing a given pattern
SYNOPSIS
grep [-elnsv] pattern [file] ...
OPTIONS -e-e pattern is the same as pattern
-c Print a count of lines matched
-i Ignore case
-l Print file names, no lines
-n Print line numbers
-s Status only, no printed output
-v Select lines that do not match
EXAMPLES
grep mouse file # Find lines in file containing mouse
grep [0-9] file # Print lines containing a digit
DESCRIPTION
Grep searches one or more files (by default, stdin) and selects out all the lines that match the pattern. All the regular expressions
accepted by ed and mined are allowed. In addition, + can be used instead of * to mean 1 or more occurrences, ? can be used to mean 0 or 1
occurrences, and | can be used between two regular expressions to mean either one of them. Parentheses can be used for grouping. If a
match is found, exit status 0 is returned. If no match is found, exit status 1 is returned. If an error is detected, exit status 2 is
returned.
SEE ALSO cgrep(1), fgrep(1), sed(1), awk(9).
GREP(1)