Sponsored Content
Top Forums Shell Programming and Scripting regexp to print after a field seperator Post 302116870 by jim mcnamara on Wednesday 9th of May 2007 06:11:59 AM
Old 05-09-2007
Code:
echo "file1: 1235131(rs32553)" |awk -F: '{print $2}'

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Awk Field Seperator Help

I wrote a script on HPUX 11.11 to turn a Decimal subnet mask (255.255.254.0) to hex 0xfffffe00 (subset of a bigger script). It works great on the HPUX systems but on the freebsd box the awk is not seperating the fields properly. I tried to google for a solution and seaching these forums i am just... (3 Replies)
Discussion started by: insania
3 Replies

2. Shell Programming and Scripting

field separator as regexp

I have some version of AWK that does not support regular expression field separators ( neither do I have nawk or gawk). How do I go about reading a line with the field separator as either the string "=#" or "+=". My data looks like this: abhishek=#nnnnn+#1234+#87 One option is to use... (2 Replies)
Discussion started by: Abhishek Ghose
2 Replies

3. UNIX for Advanced & Expert Users

find columns with whitespace as field seperator?

Hai I am using bash-2.03$ bash --version GNU bash, version 2.03.0(1)-release (sparc-sun-solaris) I am not able to use gawk command its showing command not found , why ? Eg: awk 'NR==1' fix.txt | gawk 'BEGIN { FIELDWIDTHS = "3 2" } { printf($1"|"$2); }'... (8 Replies)
Discussion started by: tkbharani
8 Replies

4. Shell Programming and Scripting

How to change field seperator

Hi Please help me out with this problem: I want to have a script that would change the nth field seperator in a line into something else. like a,d,4,2,97,8,9 into a,d,4,2,97/8/9 Thanks (2 Replies)
Discussion started by: onthetopo
2 Replies

5. Shell Programming and Scripting

Printing value with no obvious field seperator

Hi all, Can anybody think of a way to do this? I have a file with content like the following: F_TOP_PARAM_VALUEF_TOP_SOURCEF_TOP_DEL_NOTIFICATIONF_DEST_ADDRF_TOP_DEL_TYPE What I want to do is print out the value in the square brackets after F_TOP_SOURCE. So in this case I'd like to print... (4 Replies)
Discussion started by: Donkey25
4 Replies

6. UNIX for Dummies Questions & Answers

print job seperator page

How do I get my linux login ID to print on seperator page on print jobs. Right now it prints " Remote User" thanks Jim (0 Replies)
Discussion started by: jdmowrer
0 Replies

7. UNIX for Dummies Questions & Answers

print the line immediately after a regexp; but regexp is a sentence

Good Day, Im new to scripting especially awk and sed. I just would like to ask help from you guys about a sed command that prints the line immediately after a regexp, but not the line containing the regexp. sed -n '/regexp/{n;p;}' filename What if my regexp is 3 word or a sentence. Im... (3 Replies)
Discussion started by: ownins
3 Replies

8. Shell Programming and Scripting

Add a field seperator in a file.

"355"|""|"NJ"|"A0A 1W0"|"V"|""|""|""|"N" I've the above sample data seperated with pipe delimeter and in the file I want to replace a space with "|" to the 4th field so the result would be like below. So it would change from 9 fields to 10 fields. "355"|""|"NJ"|"A0A"|"1W0"|"V"|""|""|""|"N" ... (3 Replies)
Discussion started by: rudoraj
3 Replies

9. Shell Programming and Scripting

field seperator question (awk script)

Is there a way I could use different a different field seperator for different parts of the body? kinda like {FS = ":"} FILENAME == "products"{ price = $3 if(numprods < $1-100) numprods = $1-100 } {FS = "/"}{} FILENAME == "associates"{ associateid... (5 Replies)
Discussion started by: angermanaged
5 Replies

10. UNIX for Beginners Questions & Answers

Field seperator with awk

Hi, input data format: echo ' <APPLICATION="APPLSG" SUB_APPLICATION="DLY" JOBNAME="DPL_BN_RE_CCMS_SA" CMDLINE="run_job.ksh %%PARAM1 %%PARAM2" TASKTYPE="Command" />' expected format: "APPLSG", "DLY", "DPL_BN_RE_CCMS_SA", "run_job.ksh %%PARAM1 %%PARAM2" my command: echo ' ... (2 Replies)
Discussion started by: JSKOBS
2 Replies
CMIGREP(1)						      General Commands Manual							CMIGREP(1)

NAME
cmigrep - search in ocaml compiled interface files SYNOPSIS
cmigrep <options> <module-expression> DESCRIPTION
This manual page documents briefly the cmigrep command. This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page. cmigrep allows to search for information in compiled interfaces of OCaml modules. By default, the search applies to the modules described in the .cmi files in the curent directory and in the ocaml standard directory, but this can be changed with the -I option (see below). The argument <module-expr> can be an exact module name, or a shell wildcard. Multiple modules can be specified. Example: "ModA ModB Foo*.Make" means to search ModA, ModB, and any submodule Make of a module that starts with Foo. OPTIONS
General Options -I directory Add directory to the search path for modules -package packages comma separated list of findlib packages to search open modules comma separated list of open modules (in order!) -help, --help display list of options Search Patterns -t regexp print types with matching names -r regexp print record field labels with matching names -c regexp print constructors with matching names -p regexp print polymorphic variants with matching names -m regexp print all matching module names in the path -e regexp print exceptions with matching constructors -v regexp print values with matching names -o regexp print all classes with matching names -a regexp print all names which match the given expression SEE ALSO
Examples can be found on /usr/share/doc/cmigrep/README. AUTHOR
cmigrep is written by Eric Stokes <letaris@mac.com>. This manual page was compiled by Ralf Treinen <treinen@debian.org>. CMIGREP(1)
All times are GMT -4. The time now is 04:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy