Sponsored Content
Top Forums Shell Programming and Scripting Find and delete part of field with awk or sed Post 302886446 by Scottie1954 on Friday 31st of January 2014 01:37:51 PM
Old 01-31-2014
Thanks again! I wasn't escaping the slash properly. And I didn't know I could string two awk functions together with a ; so you've properly schooled me today.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Moving Part of a field to another field using AWK

Hi there, I have a comma seperated file with nine fields the fields are rerate: "numberTX",field2,field3,field4,field5..... I want to do this to the file reate: "field5TX",field2,field3,field4,field5 I know I can do this using AWK, but the thing giving me fits is that I... (5 Replies)
Discussion started by: rjsha1
5 Replies

2. Shell Programming and Scripting

Extract Part of string from 3rd field $3 using AWK

I'm executing "wc -lc" command in a c shell script to get record count and byte counts and writing them to a file. I get the result with the full pathname of the file. But I do not want the path name to be printed in the output file. I heard that using Awk we can get this but I don't have any... (4 Replies)
Discussion started by: stakuri
4 Replies

3. Shell Programming and Scripting

sed: find match and delete the line above

I am searching a dhcpd.conf to find the hardware ethernet match, then once the match is found delete just the line above it. For example: testmachine.example { hardware ethernet 00:00:00:00:00:00; fixed address 192.168.1.100; next-server 192.168.1.101; filename "linux-install/pxelinux.0"; }... (3 Replies)
Discussion started by: cstovall
3 Replies

4. Shell Programming and Scripting

Urgent! Sed/Awk Filter Find Pattern Delete Till End Of Line

Hi, I need help with using an awk or sed filter on the below line ALTER TABLE "ACCOUNT" ADD CONSTRAINT "ACCOUNT_PK" PRIMARY KEY ("ACCT_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "WMC_DATA" LOGGING ENABLE Look for... (2 Replies)
Discussion started by: rajan_san
2 Replies

5. UNIX for Advanced & Expert Users

Urgent Help required : awk/sed help to find pattern and delete till end of line

Hi, I need help with using an awk or sed filter on the below line ALTER TABLE "ACCOUNT" ADD CONSTRAINT "ACCOUNT_PK" PRIMARY KEY ("ACCT_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "WMC_DATA" LOGGING ENABLE Look for... (1 Reply)
Discussion started by: rajan_san
1 Replies

6. Shell Programming and Scripting

Replace part of a line with sed/awk

Hello I have a document and in this document I have several occurrence of "VAR == xxxxxxx" and xxxxx can be anything. I don't know what it is. I want to replace the 'xxxxx's with something I know. What I know however, is the line numbers of the VAR =='s in the file. How can I replace... (1 Reply)
Discussion started by: alirezan
1 Replies

7. Shell Programming and Scripting

FS did not show after delete one field in awk

Hello, I met a problem to delete one column out of 32, say column 13. I tried awk and gawk but neither worked. The problem is col13 can deleted but the field separator is gone too, so that the output is not in tab-delimited format. Or, col13 can't be deleted. I want the output file with TAB as... (3 Replies)
Discussion started by: yifangt
3 Replies

8. UNIX for Dummies Questions & Answers

sed or awk - removing part of line?

hi all, I am having trouble finding the right string for this - I dont know whether to use awk or sed.. If I have a file with alot of names and phone numbers like this McGowan,Sean 978-934-4000 Kilcoyne,Kathleen 603-555-1212 Club603,The 617-505-1332 Boyle,William 301-444-1221 And... (11 Replies)
Discussion started by: alis
11 Replies

9. Shell Programming and Scripting

awk to split one field and print the last two fields within the split part.

Hello; I have a file consists of 4 columns separated by tab. The problem is the third fields. Some of the them are very long but can be split by the vertical bar "|". Also some of them do not contain the string "UniProt", but I could ignore it at this moment, and sort the file afterwards. Here is... (5 Replies)
Discussion started by: yifangt
5 Replies

10. Shell Programming and Scripting

awk and get a part of field ?

I have a list of log.txt, thisis a flatfile separate by a pipe | 2012/06/23 18:58:15 | 4:sabercats pid=020272 opened Boards 0, 1, 2, 3 for /home/directory_germany/germany/location/qt/NET12/full_111_ddr5_soq523_2X_FV_4BD_PD3_0.qt/dbFiles/germany.proto |berlin|test1|test2 2012/06/25 17:40:56... (2 Replies)
Discussion started by: sabercats
2 Replies
cs_register_strfunc(3)						      cs/cs.h						    cs_register_strfunc(3)

NAME
cs_register_strfunc - register a string handling function SYNOPSIS
#include <cs/cs.h> NEOERR *cs_register_strfunc(CSPARSE *parse, char *funcname, CSSTRFUNC str_func); ARGUMENTS
parse - a pointer to a CSPARSE structure initialized with cs_init() funcname - the name for the CS function call Note that registering a duplicate funcname will raise a NERR_DUPLICATE error str_func - a CSSTRFUNC not-callback DESCRIPTION
cs_register_strfunc will register a string function that can be called during CS render. This not-callback is designed to allow for string formating/escaping functions that are not built-in to CS (since CS is not HTML specific, for instance, but it is very useful to have CS have functions for javascript/html/url escaping). Note that we explicitly don't provide any associated data or anything to attempt to keep you from using this as a generic callback... The format of a CSSTRFUNC is: NEOERR * str_func(char *in, char **out); This function should not modify the input string, and should allocate the output string with a libc function. (as we will call free on it) SEE ALSO
cs_dump(3), cs_destroy(3), cs_render(3), cs_register_esc_strfunc(3), cs_arg_parsev(3), cs_register_fileload(3), cs_init(3), cs_regis- ter_strfunc(3), cs_arg_parse(3), cs_parse_string(3), cs_parse_file(3), =(3), cs_register_function ClearSilver 12 July 2007 cs_register_strfunc(3)
All times are GMT -4. The time now is 01:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy