04-21-2011
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have this files:
./frm/lf_mt1_cd.Ic_cell_template.attr
./die/addgen_tb_pumd.Ic_cell_template.attr
./min_m1_n.Ic_cell_template.attr
When I use:
awk -F\/ '{print NF}'
Would result to:
3
3
2
I would like to list the files with 3 fields on it. Any Suggestions? (1 Reply)
Discussion started by: jehrome_rando
1 Replies
2. Shell Programming and Scripting
Hi,
We are facing some issues while finding the particular string.
Our file is:
cat 1.txt
Node Name(s)
Preparation fragment
Partition:
Transformation instance:
Transformation:
Applied rows:
Affected rows:
Rejected rows:
Throughput(Rows/Sec):
Throughput(Bytes/Sec):
Last... (3 Replies)
Discussion started by: Amey Joshi
3 Replies
3. Shell Programming and Scripting
Hi,
A very Good Evening to All,
I am writing a script for my application. I have a file with 1000 lines. Among that 1000 lines i am searching for a particular string. And from that string i need to pull all the data in to a seperate file.
For example the contents of my file is as below.
... (4 Replies)
Discussion started by: intiraju
4 Replies
4. Shell Programming and Scripting
Hi,
The below code will search a particular string(say false in this case) and return me 10 lines above and below the search string in a file.
" awk 'c-->0;$0~s{if(b)for(c=b+1;c>1;c--)print r;print("***********************************");print;c=a;}b{r=$
0}' b=10 a=10 s="false" "
... (5 Replies)
Discussion started by: vimalm22
5 Replies
5. Shell Programming and Scripting
I woud like to substitue a string on a specific position for specific lines
I've got a file and I would like to change a specific string from "TOCHANGE" to "ABCABCAB"
For every line (except 1,2, 3 and the last one) , I need to check between the 9th and the 16th digits.
For the 3rd line, I... (7 Replies)
Discussion started by: BSF
7 Replies
6. Shell Programming and Scripting
Hello,
I want to print a number of lines of a file after a specific expression of a line.
I have this sed command but it prints only 1 line after the expression.
How could I adapt it to print for instance 10 lines after or 15 lines after ?
sed -n '/regexp/{n;p;}'
Thx & Regs,
Rany. (5 Replies)
Discussion started by: rany1
5 Replies
7. Shell Programming and Scripting
Please help .
The script need to first grep for all lines with "C:" as it contains a value
Here the value is 0
1,00: This , is a good script c:0
and then give output of the lines with top 3 highest value for c:
1,00: This , is a nice script c:9999
1,00: This , is a... (3 Replies)
Discussion started by: necro98
3 Replies
8. Shell Programming and Scripting
Hi
I have a file like
# vi require.txt
1,BANK,Read blocks that cycle.
yellow
Read blocks.
2,ACCOUNT,Finished
Red
Finished .
3,LOAN, pipe
white
pipe
4,PROFIT,Resolve.
black
Resolve
Am using like
cat require.txt | grep -w ACCOUNTThe output I get is (8 Replies)
Discussion started by: Priya Amaresh
8 Replies
9. UNIX for Dummies Questions & Answers
Hi
I have a file which is tab-delimited. Now, I'd like to print the lines which have "chr6" string in both first and second columns. Could anybody help? (3 Replies)
Discussion started by: a_bahreini
3 Replies
10. Shell Programming and Scripting
This is an extract from a large file. The lines that start with fc are ports on a fabric switch. In between each fc port there is information about the port.
fc2/12 is up
Port description is SEIEDISCOVER-3
Speed is 4 Gbps
fc2/13 is down (Administratively down)
fc2/14 is up
Port... (1 Reply)
Discussion started by: kieranfoley
1 Replies
SARY(1) Sary SARY(1)
NAME
sary - manual page for sary 1.0.2
SYNOPSIS
sary [OPTION]... PATTERN FILE
DESCRIPTION
-c, --count
only print a count of occurrences
-i, --ignore-case
ignore case distinctions
-l, --lexicographical
sort in lexicographical order
-A, --after-context=NUM
print NUM lines of trailing context
-B, --before-context=NUM
print NUM lines of leading context
-C, --context=[NUM],
print NUM (default 2) lines of output context
-s, --start=TAG,
print tagged region. set start tag to TAG
-e, --end=TAG,
print tagged region. set end tag to TAG
-h, --help
display this help and exit
COPYRIGHT
Copyright (C) 2000 Satoru Takabayashi All rights reserved.
This is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER-
CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
sary 1.0.2 December 2000 SARY(1)