01-28-2010
Trying to Parse Version Information from Text File
I have a file name version.properties with the following data:
major.version=14
minor.version=234
I'm trying to write a grep expression to only put "14" to stdout. The following is not working.
grep "major.version=([0-9]+)" version.properties
What am I doing wrong?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Please help.
I have a text file which looks something like this
aaa@abc.com, c:FilePath\Eaaa.txt
bbb@abc.com, c:FilePath\Ebbb.txt
ccc@abc.com, c:FilePath\Eccc.txt
ddd@abc.com, c:FilePath\Eddd.txt...so on
I want to write a shell script which will pick up the first field 'aaa@abc.com' and... (12 Replies)
Discussion started by: Amruta Pitkar
12 Replies
2. Shell Programming and Scripting
i am attempting to parse a simple text file with multiple lines and four fields in each line, formatted as such:
12/10/2006 12:34:06 77 38
this is what i'm having problems with in my bash script:
sed '1,6d' $RAWDATA > $NEWFILE
#removes first 6 lines from file, which are... (3 Replies)
Discussion started by: klick81
3 Replies
3. Shell Programming and Scripting
I have a file that has a header followed by 8 columns of data. I want to toss out the header, and then write the data to another file with a different header and footer. I also need to grab the first values of the first and second column to put in the header.
How do I chop off the header? ... (9 Replies)
Discussion started by: craggm
9 Replies
4. UNIX for Dummies Questions & Answers
Hi, everyone
The input file pattern is like below:
Begin Object1
txt1
end
;
Begin Object2
txt2
end
;
... (14 Replies)
Discussion started by: sophiadun
14 Replies
5. Shell Programming and Scripting
Hi guys,
I desperately need some help here...
I need to parse a file similar to this:
I need to read the values for MY_BANNER_SSHD and WARNING_MESSAGE. The value could be empty/single line or multi-line!
# Comments
.
.
.
Some lines
MY_BANNER_SSHD=""... (7 Replies)
Discussion started by: shreeda
7 Replies
6. Shell Programming and Scripting
I wanted to parse a text file and join in specific format. please suggest me how to get this done..
The output should be in fasta format which consists of lines starting with ID, PT, PA and Sequence. "//" the two slashes are dividing lines between two different sequences.
Like... (10 Replies)
Discussion started by: empyrean
10 Replies
7. UNIX for Dummies Questions & Answers
Hello, I'm trying to take information from a list of hundreds of subject ids (where each line is a new subject id), and insert each line into a new text file that contains the pathnames for each subject.
To clarify, all subject have a similiar path name (e.g., C:\data\SUBJECT_ID\) that contains... (4 Replies)
Discussion started by: invisibledwarf
4 Replies
8. Shell Programming and Scripting
awk -F "" '/<href=>|<href=>|<top>|<top>/ {print $3, OFS=\t}' source.txt > output.txt
I'm not quite sure how to parse the attached file, but what I am trying to do is in a output file have the link (href=), name (after the <), and count (<top>) in 3 separate columns.
My attempt is the above... (2 Replies)
Discussion started by: cmccabe
2 Replies
9. Shell Programming and Scripting
The below awk parser works for most data inputs, but I am having trouble with the last one. The problem is in the below rules steps 1 and 2 come from $2 (NC_000013.10:g.20763686_20763687delinsA) and steps 3 and 4 come from $1 (NM_004004.5:c.34_35delGGinsT).
Parse Rules:
The header is... (0 Replies)
Discussion started by: cmccabe
0 Replies
10. UNIX for Advanced & Expert Users
Hello,
I am working parsing a large input file1(field CFA)
I have to compare the the file1 field(CFA byte 88-96) with the content of the file2(It contains only one field) and and insert rows equal
in another file.
Here is my code and sample input file:
... (7 Replies)
Discussion started by: GERMANOS
7 Replies
LEARN ABOUT CENTOS
xiqueryversion
XIQUERYVERSION(3) XIQUERYVERSION(3)
NAME
XIQueryVersion - announce and query the support XI2 version.
SYNOPSIS
#include <X11/extensions/XInput2.h>
Status XIQueryVersion( Display *display,
int *major_version_inout,
int *minor_version_inout);
display
Specifies the connection to the X server.
major_version_inout
Specifies the client's supported XI2 version, and
returns the server's supported version.
minor_version_inout
Specifies the client's supported XI2 version, and
returns the server's supported version.
DESCRIPTION
XIQueryVersion announces the client's supported XI2 version to
the server and returns server's supported X Input version. Clients
are required to use XIQueryVersion instead of XGetExtensionVersion
if they use XI2 calls. The server may treat a client differently
depending on the supported version announced by the client.
The major_version_inout must be 2 or greater, otherwise a BadValue
error occurs.
If the server does not support XI2, XIQueryVersion returns BadRequest
to the client. Otherwise, XIQueryVersion returns Success. In both
cases major_version_inout and minor_version_inout are set to the
server's supported version.
Consecutive calls to XIQueryVersion by the same client always return the
first returned major.minor version. If the client requests a version
lower than the first returned major.minor version in a subsequent call, a
BadValue error occurs.
XIQueryVersion can generate a BadValue error.
EXAMPLES
int rc;
int major = 2;
int minor = 0;
rc = XIQueryVersion(dpy, &major, &minor);
if (rc == Success)
printf("XI2 supported. (%d.%d)
", major, minor);
else if (rc == BadRequest)
printf("No XI2 support. (%d.%d only)
", major, minor);
else
printf("Internal error
");
DIAGNOSTICS
BadValue
A value is outside of the permitted range.
03/09/2013 XIQUERYVERSION(3)