Sponsored Content
Top Forums Shell Programming and Scripting Extract 2 or more int from the text with delimiter. Post 302371700 by thegeek on Monday 16th of November 2009 05:14:57 AM
Old 11-16-2009
Code:
echo "Hi I am 100, my friend is 500, his friend is 423" | sed -n "s/\([^0-9]*\)\([0-9]\+\)/\2|/gp"

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

int open(const char *pathname, int flags, mode_t mode) doubt...

hello everybody! I want to create a file with permissions for read, write, and execute to everybody using C, so I write this code: #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> int main(){ int fileDescriptor; fileDescriptor =... (2 Replies)
Discussion started by: csnmgeek
2 Replies

2. Shell Programming and Scripting

Insert text between delimiter

Can someone help me on this? I'm creating an Insert stmt script but Oracle does not accept blanks values. How can I insert the word null between two commas? I'm guessing awk or sed. Is there a good post or site with easy to understand info on awk and sed? I'm really new to unix scripts :D ... (5 Replies)
Discussion started by: ystee
5 Replies

3. UNIX for Dummies Questions & Answers

extract fields from text file using delimiter!!

Hi All, I am new to unix scripting, please help me in solving this assignment.. I have a scenario, as follows: 1. i have a text file(read1.txt) with the following data sairam,123 kamal,122 etc.. 2. I have to write a unix... (6 Replies)
Discussion started by: G.K.K
6 Replies

4. Shell Programming and Scripting

extract string from varying delimiter line

Hi I have lines like this a=1, b=2, c=3, a=1, d=4, e=5, b=225, I need to extract the b=nnn... value. I dont know how many other entries will be before and after it in each line. Ive tried a basic line like awk '/b=/, $NF ~ /,/ ' myfile.txt but I think that it doesnt care which comma it... (5 Replies)
Discussion started by: rebelbuttmunch
5 Replies

5. Shell Programming and Scripting

Extract semicolon separated delimiter

The log reads as follows. fname1;lname1;eid1;addr;pincode1; fname2;lname2;eid2;addr2;pincode2; fname3;lname3;eid3;addr3;pincode3; fname4;lname4;eid;addr4;pincode4; how do i extract only fname and save it in an array similarly for lname and so on i tried reading a file and cutting each... (5 Replies)
Discussion started by: vkca
5 Replies

6. Programming

Handle int listen(int sockfd, int backlog) in TCP

Hi, from the manual listen(2): listen for connections on socket - Linux man page It has a parameter called backlog and it limits the maximum length of queue of pending list. If I set backlog to 128, is it means no more than 128 packets can be handled by server? If I have three... (3 Replies)
Discussion started by: sehang
3 Replies

7. Shell Programming and Scripting

Shell script to put delimiter for a no delimiter variable length text file

Hi, I have a No Delimiter variable length text file with following schema - Column Name Data length Firstname 5 Lastname 5 age 3 phoneno1 10 phoneno2 10 phoneno3 10 sample data - ... (16 Replies)
Discussion started by: Gaurav Martha
16 Replies

8. Shell Programming and Scripting

Extract string between two delimiter

I want a string between two delimeter like ( ) from file. Input File, 2007_08_07_IA-0100-014_(January).PDF 2007_08_07_IA-0100-031_(January February March April June July).PDF 2008-02-28_KR-1022-003_(January febuary march april may).CSV Output File, January January February... (19 Replies)
Discussion started by: Pratik Majithia
19 Replies

9. Shell Programming and Scripting

Skip the delimiter with in double quotes and count the number of delimiters during data extract

Hi All, I'm stuck-up in finding a way to skip the delimiter which come within double quotes using awk or any other better option. can someone please help me out. Below are the details: Delimited: | Sample data: 742433154|"SYN|THESIS MED CHEM PTY.... (2 Replies)
Discussion started by: BrahmaNaiduA
2 Replies

10. Shell Programming and Scripting

Extract multiple columns base on double quotes as delimiter

Hi All, I have my data like below "1","abc,db","hac,aron","4","5" Now I need to extract 1,2,4th columns Output should be like "1",abc,db","4" Am trying to use cut command but not able to get the results. Thanks in advance. (4 Replies)
Discussion started by: weknowd
4 Replies
GCJH(1) 								GNU								   GCJH(1)

NAME
gcjh - generate header files from Java class files SYNOPSIS
gcjh [-stubs] [-jni] [-add text] [-append text] [-friend text] [-preprend text] [--classpath=path] [--CLASSPATH=path] [-Idir...] [-d dir...] [-o file] [-td dir] [-M] [-MM] [-MD] [-MMD] [--version] [--help] [-v] [--verbose] classname... DESCRIPTION
The "gcjh" program is used to generate header files from class files. It can generate both CNI and JNI header files, as well as stub implementation files which can be used as a basis for implementing the required native methods. OPTIONS
-stubs This causes "gcjh" to generate stub files instead of header files. By default the stub file will be named after the class, with a suf- fix of .cc. In JNI mode, the default output file will have the suffix .c. -jni This tells "gcjh" to generate a JNI header or stub. By default, CNI headers are generated. -add text Inserts text into the class body. This is ignored in JNI mode. -append text Inserts text into the header file after the class declaration. This is ignored in JNI mode. -friend text Inserts text into the class as a "friend" declaration. This is ignored in JNI mode. -prepend text Inserts text into the header file before the class declaration. This is ignored in JNI mode. --classpath=path --CLASSPATH=path -Idirectory -d directory -o file These options are all identical to the corresponding gcj options. -o file Sets the output file name. This cannot be used if there is more than one class on the command line. -td directory Sets the name of the directory to use for temporary files. -M Print all dependencies to stdout; suppress ordinary output. -MM Print non-system dependencies to stdout; suppress ordinary output. -MD Print all dependencies to stdout. -MMD Print non-system dependencies to stdout. --help Print help about "gcjh" and exit. No further processing is done. --version Print version information for "gcjh" and exit. No further processing is done. -v, --verbose Print extra information while running. All remaining options are considered to be names of classes. SEE ALSO
gcc(1), gcj(1), gij(1), jv-scan(1), jcf-dump(1), gfdl(7), and the Info entries for gcj and gcc. COPYRIGHT
Copyright (C) 2001, 2002 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being ``GNU General Public License'', the Front- Cover texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the man page gfdl(7). gcc-3.2.2 2003-02-25 GCJH(1)
All times are GMT -4. The time now is 07:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy