Hello everyone, I need to write a shell script for a file consisting of 3 columns, first column is frequency the second one is power and the last one is number of occurence. I basically need to get the power and the frequency corresponding to the highest number of occurrence number. Below is the part of my file.
So at the end I would like to get something like this:
Can you help me out with this problem?
---------- Post updated at 12:55 PM ---------- Previous update was at 12:46 PM ----------
Sorry somehow the text is not aligned correctly
Here is the sample file
I have two text file....
One text file contain in this format......
keyvalue.txt \SUM\SUM_cam.c
\SUM\SUM_cam.h
\SUM\SUM_command.c
\SUM\SUM_command.h
\SUM\SUM_dab.c
\SUM\SUM_dmb.c
\SUM\SUM_eventHandler.h
\SUM\SUM_eventHandler_dab.c
\SUM\SUM_eventHandler_dmb.c ... (6 Replies)
What's the best way to format the text file shown below the way in which
COlA ColB ColC ColD
---- ---- ---- ----
70 923 AAA 5864
70 testing AAA 13062
PPPPPP test AAA 142 (0 Replies)
Dear friends,
I have a file with the text:
href="/archive/ip=x.x.x.x">M</a></td>
I want to extract just the IP number. I tried sed, awk but i didn't succeed.
Any idea?
Thank you
Please view this code tag video for how to use code tags when posting code and data. (3 Replies)
Hello Unix.com
How can I sort from a large email list only the emails that finish with .ca domain?
cat <list> | grep "\.ca\b" >> <new list> isnt working perfectly.
Any tips?
Best regards, Galford D. Weller (2 Replies)
Hi All,
I ahve requirement where I want to put the text file in into proper format. I am wondering how can i achieve that:-
Host/Alias Name IP Address Resolved
sinuiy01.infra.go2uti.com 10.240.8.158 N
sinuid20.devtst.go2uti.com 10.240.8.230 N
sinuid21.devtst.go2uti.com... (6 Replies)
Hi All,
I have the below text file from which I have to cut particular section starting from PTR_Security_Rpeorting.cpf to PTR_Security_Reporting_Env93_export.
Report Model............: "D:\Cognos_Publishing\tmp.a2R94KLQec"\PTR_Security_Reporting.cpf
Report Output Script....:... (4 Replies)
Is it possible to replace a line of text within a file while it's closed with a single command or a script? Please show me an example or point me to a webpage that shows an example. The file has this line of text:
LoginGraceTime 100
I want to replace it with the following:
... (2 Replies)
Hello again,
I have put together a shell script using sed and some shell commands, and it runs pretty well when I am in terminal, but when I save it as a text file and invoke it through the terminal by typing its path, all I get are errors.
Can some one give me some hints as to what I am doing... (13 Replies)
hi all,
trying this using shell/bash with sed/awk/grep
I have two files, one containing one column, the other containing multiple columns (comma delimited).
file1.txt
abc12345
def12345
ghi54321
...
file2.txt
abc1,text1,texta
abc,text2,textb
def123,text3,textc
gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
LEARN ABOUT FREEBSD
atf-sh
ATF-SH(1) BSD General Commands Manual ATF-SH(1)NAME
atf-sh [-s shell] -- interpreter for shell-based test programs
SYNOPSIS
atf-sh script
DESCRIPTION
atf-sh is an interpreter that runs the test program given in script after loading the atf-sh(3) library.
atf-sh is not a real interpreter though: it is just a wrapper around the system-wide shell defined by ATF_SHELL. atf-sh executes the inter-
preter, loads the atf-sh(3) library and then runs the script. You must consider atf-sh to be a POSIX shell by default and thus should not
use any non-standard extensions.
The following options are available:
-s shell Specifies the shell to use instead of the value provided by ATF_SHELL.
ENVIRONMENT
ATF_LIBEXECDIR Overrides the builtin directory where atf-sh is located. Should not be overridden other than for testing purposes.
ATF_PKGDATADIR Overrides the builtin directory where libatf-sh.subr is located. Should not be overridden other than for testing purposes.
ATF_SHELL Path to the system shell to be used in the generated scripts. Scripts must not rely on this variable being set to select a
specific interpreter.
EXAMPLES
Scripts using atf-sh(3) should start with:
#! /usr/bin/env atf-sh
Alternatively, if you want to explicitly choose a shell interpreter, you cannot rely on env(1) to find atf-sh. Instead, you have to hardcode
the path to atf-sh in the script and then use the -s option afterwards as a single parameter:
#! /path/to/bin/atf-sh -s/bin/bash
ENVIRONMENT
ATF_SHELL Path to the system shell to be used in the generated scripts.
SEE ALSO atf-sh(3)BSD September 27, 2014 BSD