02-26-2013
I could interpret your request several different ways. Please show us an example of the output you're trying to produce.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
A few questions: I'm trying to use Bash (although I'm not against using AWK) to try to accomplish a few things, but I'm stumped on a few points.
I'm learning most of the basics quickly: but there are a few things I can't figure out.
1. I'm trying to count the number of .txt files in a... (3 Replies)
Discussion started by: Asylus
3 Replies
2. Shell Programming and Scripting
I am writing a awk script that gathers certain data from certain fields. I needed a awk solution for this, because it will later become a function in the script.
I have the following data that I need output on a single line, but record spans across multilple lines and records are not... (7 Replies)
Discussion started by: timj123
7 Replies
3. Shell Programming and Scripting
Hello! Well, I searched and wasn't able to find a specific example of my dilemma, so hopefully someone could assist? Or maybe there was an example but I missed it?
I have two files:
file1 = order data file
file2 = list of 65,000+ order numbers
I would like to extract from 'file1' any... (5 Replies)
Discussion started by: rm -r *
5 Replies
4. Shell Programming and Scripting
Hi, I am working with files containing 2 columns in which i need to come up with the frequency/count of values in col. 2 falling within specifics binned values of col. 1. the contents of a sample file is shown below:
15 12.5
15 11.2
16 0.2
16 1.4
17 1.6
18 4.5
17 5.6
12 8.6
11 7.2
9 ... (13 Replies)
Discussion started by: ida1215
13 Replies
5. UNIX for Dummies Questions & Answers
cat doc | nawk -v da="${date}" '$23>199 {print $0 > "doc"+da+".txt"}'
Every time(need to run every day) i run this, i want to a create a new file "doc_01 Aug.txt".
Basically, i want to create a new file with date appended in it.
The above command is creating a file with name "0".... (4 Replies)
Discussion started by: vagar11
4 Replies
6. Shell Programming and Scripting
Hi all,
I think so I’m getting the result is wrong, while using following awk commend,
colval=$(awk 'FNR>1 && NR==FNR{a=$4;next;} FNR>1 {a+=$4; print $2"\t"a/3}'
filename_f.tsv filename_f2.tsv filename_f3.tsv)
echo $colval >> Result.tsv
it’s doing the condition 2 times, first result... (5 Replies)
Discussion started by: Shenbaga.d
5 Replies
7. Shell Programming and Scripting
Hi, i want to print 2nd column value with the below script. I need to take input of the string i need to search in that file and file name. How can i take these two as inputs? using read command? Getting error for below script.
echo "enter SID"
read SID
echo "enter filename"
read filename... (8 Replies)
Discussion started by: sam_bd
8 Replies
8. Shell Programming and Scripting
# more minusf.awk
#!/bin/awk -f
BEGIN {
FS=":";
}
{
if ( $2 == "" ) {
print $1 ": no password!";
}
}
# ./minusf.awk aa aa aa aa
awk: can't open aa (6 Replies)
Discussion started by: sri.phani
6 Replies
9. Shell Programming and Scripting
I wish to use AWK to do something akin: Select all 2D data with 1<$1<2 and -7.5<$2<-6.5
But it's not working
awk 'END {print ($1<=2&&$1>=1&&$2<=-6.5&&$2>=-7.5)}' bla
Data:
-1.06897 -8.04482 -61.469
-1.13613 -8.04482 -61.2271
-1.00182 -8.04482 -61.2081
-1.06897 -8.13518 -60.8544... (2 Replies)
Discussion started by: chrisjorg
2 Replies
10. UNIX for Beginners Questions & Answers
I would like to create bins to get histogram with totals and percentage, e.g. starting from 0.
If possible to set the minimum and maximum value in the bins ( in my case value min=0 and max=20 )
Input file
8 5
10 1
11 4
12 4
12 4
13 5
16 7
18 9
16 9
17 7
18 5
19 5
20 1
21 7 (10 Replies)
Discussion started by: jiam912
10 Replies
LEARN ABOUT HPUX
show_cell
show cell(1m) show cell(1m)
NAME
show cell - Displays the information you need to create a cell entry in either DNS or GDS
SYNOPSIS
cdscp show cell cell-name [as type]
ARGUMENTS
The global name of the cell. The global namespace in which you want to define the cell. Enter either of the values dns or gds. The
default is gds.
DESCRIPTION
The show cell command displays the information you need to create a cell entry in either the Domain Name System (DNS) or the Global Direc-
tory Service (GDS). DCE does not support cells registered simultaneously in GDS and DNS. If you want to define a cell in DNS, you can use
this command to produce a preformatted set of resource records. You can then edit the appropriate DNS data file and copy the output
directly into the file. In GDS, cell information is contained in two attributes: CDS-Cell and CDS-Replica. If you want to define a cell
in GDS, you can use this command to obtain the data you need to supply when creating the CDS-Cell and CDS-Replica attributes. For details,
see the OSF DCE Administration Guide.
Privilege Required
You must have read permission to the cell root directory.
NOTE
This command may be replaced in future releases by the dcecp command, and may no longer be supported at that time.
EXAMPLES
The following command displays the GDS-formatted output in the local cell: cdscp> show cell /.../abc.com as gds
SHOW
CELL /.../abc.com
AT 1991-10-15-15:58:25
Namespace Uuid = 2d2d50ad-8b1a-11ba-8983-08002b0f79aa
Clearinghouse Uuid = 2ab024a8-8b1a-11ba-8983-08002b0f79aa
Clearinghouse Name = /.../abc.com/NY_CH
Replica Type = Master
Tower 1 = ncadg_ip_udp:16.18.17.33
Tower 2 = ncacn_ip_tcp:16.18.17.33
Namespace Uuid = 2d2d50ad-8b1a-11ba-8983-08002b0f79aa
Clearinghouse Uuid = 49757f28-8b1a-11ba-8983-08002b0f79aa
Clearinghouse Name = /.../abc.com/Boston_CH
Replica Type = Readonly
Tower 1 = ncadg_ip_udp:16.18.17.33
Tower 2 = ncacn_ip_tcp:16.18.17.33
RELATED INFORMATION
Books: OSF DCE Administration Guide
show cell(1m)