09-22-2008
That looks right, I will test it on an actual file and let you know.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I have a file that I need to parse multiple sections from the file.
The file contains multiple lines that start with ST (Abunch of data)
Then the file contains multiple lines that start with SE (Abunch of data)
SE*30*0001 ... (1 Reply)
Discussion started by: rgentis
1 Replies
2. Shell Programming and Scripting
I have a file that I need to parse multiple sections from the file.
The file contains multiple lines that start with ST (Abunch of data)
Then the file contains multiple lines that start with SE (Abunch of data)
SE*30*0001
ST*810*0002
I need all of the lines between and including these.... (6 Replies)
Discussion started by: rgentis
6 Replies
3. Shell Programming and Scripting
Here is a data file, which I believe is in YAML. I am trying to retrieve just the 'addon_domains" section, which doesnt seem to be as easy as I had originally thought. Any help on this would be greatly appreciated!! I have been trying to do this in awk and mostly bash scripting instead of perl... (3 Replies)
Discussion started by: Rhije
3 Replies
4. Shell Programming and Scripting
I've been trying to remove some lines of a xml file that looks like this:
<parent>
<child>name1</child>
<lots_of_other tags></lots_of_other_tags>
</parent>
<parent>
<child>name2</child>
<lots_of_other tags></lots_of_other_tags>
</parent>
<parent>
<child>name3</child>
... (5 Replies)
Discussion started by: viniciusandre
5 Replies
5. Programming
Hi All,
I have a file with the data 10;20;30;40;50;60;70;80;123;145;156;345. the output i want is the first fourth sixth elements and everything from there on. How do i achieve this. (1 Reply)
Discussion started by: raghu_shekar
1 Replies
6. Shell Programming and Scripting
I have a file that looks liek this (see below). can somebody provide me with and awk or sed command that can take a piece of the file starting from the time to the blank line and put in into another file.
For example: How would I get the data from 10:56:11 to the blank line.
Two things:
... (5 Replies)
Discussion started by: BeefStu
5 Replies
7. Shell Programming and Scripting
I have a configuration file that contains hundreds of these chunks. Each "chunk" is the section that begins with "define service {" and ends with "}".
define service {
check_command check_proc!java
hostgroup_name
service_description ... (5 Replies)
Discussion started by: SkySmart
5 Replies
8. Shell Programming and Scripting
Hello,
I need some help with renaming some files by removing a certain portion of the filename.
The current file name is: ABC_2013186197_20130708_203556.95336
I need to remove the 5 digits after the first "_". The new file name should be:
ABC_197_20130708_203556.95336
I'm not quite... (5 Replies)
Discussion started by: bbbngowc
5 Replies
9. Shell Programming and Scripting
Hi,
I have a file with many sections in it. Each section is separated by a blank line.
The first line of each section would determine if the section is duplicate or not.
if the section is duplicate then remove the entire section from the file.
below is the example of input and output.... (5 Replies)
Discussion started by: ahmedwaseem2000
5 Replies
10. Shell Programming and Scripting
Hello experts,
I have a text file with lot of curly brackets (both opening { & closing } ). I need to delete them alongwith the text between opening & closing brackets' pair.
For ex: Input:-
59. Rh1 Qe4 {(Qf5-e4 Qd8-g8+ Kg6-f5
Qg8-h7+ Kf5-e5 Qh7-e7+ Ke5-f5 Qe7-d7+ Qe4-e6 Qd7-h7+ Qe6-g6... (6 Replies)
Discussion started by: prvnrk
6 Replies
LEARN ABOUT FREEBSD
atf-test-program
ATF-TEST-PROGRAM(1) BSD General Commands Manual ATF-TEST-PROGRAM(1)
NAME
atf-test-program -- common interface to ATF test programs
SYNOPSIS
atf-test-program [-r resfile] [-s srcdir] [-v var1=value1 [.. -v varN=valueN]] test_case
atf-test-program -l
DESCRIPTION
Test programs written using the ATF libraries all share a common user interface, which is what this manual page describes. NOTE: There is no
binary known as atf-test-program; what is described in this manual page is the command-line interface exposed by the atf-c, atf-c++ and
atf-sh bindings.
In the first synopsis form, the test program will execute the provided test case and print its results to the standard output, unless other-
wise stated by the -r flag. Optionally, the test case name can be suffixed by ':cleanup', in which case the cleanup routine of the test case
will be executed instead of the test case body; see atf-test-case(4). Note that the test case is executed without isolation, so it can and
probably will create and modify files in the current directory. To execute test cases in a controller manner, you need a runtime engine that
understands the ATF interface. The recommended runtime engine is kyua(1). You should only execute test cases by hand for debugging pur-
poses.
In the second synopsis form, the test program will list all available test cases alongside their meta-data properties in a format that is
machine parseable. This list is processed by kyua(1) to know how to execute the test cases of a given test program.
The following options are available:
-l Lists available test cases alongside a brief description for each of them.
-r resfile Specifies the file that will receive the test case result. If not specified, the test case prints its results to stdout. If
the result of a test case needs to be parsed by another program, you must use this option to redirect the result to a file
and then read the resulting file from the other program. Note: do not try to process the stdout of the test case because
your program may break in the future.
-s srcdir The path to the directory where the test program is located. This is needed in all cases, except when the test program is
being executed from the current directory. The test program will use this path to locate any helper data files or utilities.
-v var=value Sets the configuration variable var to the value value.
SEE ALSO
kyua(1)
BSD
March 2, 2014 BSD