Sponsored Content
Full Discussion: Modify awk statement
Top Forums Shell Programming and Scripting Modify awk statement Post 302760683 by RudiC on Thursday 24th of January 2013 11:55:57 AM
Old 01-24-2013
This is entirely different from your first request! Nevertheless, try
Code:
$ echo "jabalaw--sony--4444 marykate--toshiba--244444 mark--sanyo--3334343" | awk '/^mark/' RS=" " 
mark--sanyo--3334343


Last edited by RudiC; 01-24-2013 at 12:57 PM.. Reason: Typo
This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

modify file using awk

I have a file, a.asc which is generated from a shell script: -----BEGIN PGP MESSAGE----- Version: PGP 6.5.8 qANQR1DBwE4DR5PN6zVjZTcQA/9z5Eg94cwYdTnC7v+JUegQuJwHripqnyjFrEs/ejzKYCNmngbHHmf8V4K3uFkYyp74aFf+CdymA030RKs6ewOwkmqRW19oIXCgVe8Qmfg+/2KTq8XN =0QSP -----END PGP MESSAGE----- I want... (12 Replies)
Discussion started by: nattynatty
12 Replies

2. Linux

Modify expect script with control statement

Ok, so I have this script that was provided to me by one of the posters on this site. This script seems to be perfect. However, since this is a telnet script, i need to add an if then statement to it but dont know how to do it. What i want to do is to have this script spit out a certain... (3 Replies)
Discussion started by: SkySmart
3 Replies

3. Shell Programming and Scripting

awk can't modify the input file ??

Hi * I've just wanted to ask you if it's possible to modify the input file by using awk. Let me explain what I need: I need to change the value $4 from "defaults" to "nodev" in my text file. I've tried to use a string function called "sub" and it works. But I can't figure it out how to... (6 Replies)
Discussion started by: martinp111
6 Replies

4. Shell Programming and Scripting

Modify an XLS file with Awk

Hello, I have 2 files. One has a list of serial numbers: 12345_7 2345_9 35454 4759:1 PEP8794 The other is an excel file, with multiple columns, separated by tab: 12345_7 ... ... .. .. .. .. .. 2345_9 ... ... .. .. .. .. .. 35454 ... ... .. .. .. .. .. 4759:1 ...... (4 Replies)
Discussion started by: ad23
4 Replies

5. Shell Programming and Scripting

modify awk

awk "BEGIN {if($PERCENT<$WARNING) {print \"OK\" ; exit 0} else if(($PERCENT>=$WARNING) && ($PERCENT<$CRITICAL)) {print \"WARNING\" ; exit 1} else if($PERCENT>=$CRITICAL) {print \"CRITICAL\" ; exit 2} }" how can i... (1 Reply)
Discussion started by: SkySmart
1 Replies

6. Shell Programming and Scripting

Modify text file using awk

I have text file with lines as shown here. Each row has 11 columns separated by tab. In each row, i want to split the 8th column such that the output should look like shown below. Here value in the 9th column is DP value and in the 10th column is MQ value followed by the values after resource.EFF=.... (15 Replies)
Discussion started by: mehar
15 Replies

7. Shell Programming and Scripting

Modify xml using sed or awk

Hi All, I want to modify(changing the status from "on" to "off" status of Stage-element value from the below xml file using sed or awk: File Name: global.xml <?xml version="1.0" encoding="UTF-8"?> <config> <widget> <name>HTTP-POOL</name> <attributes> ... (5 Replies)
Discussion started by: wamqemail2
5 Replies

8. Shell Programming and Scripting

Convert Update statement into Insert statement in UNIX using awk, sed....

Hi folks, I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex. I have a bunch of update statements with all columns in a file which I need to convert into insert statements. UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Discussion started by: dev123
0 Replies

9. Shell Programming and Scripting

awk modify string

Hi Guys, i world like to do the following with awk, i have the the complete username example in a file a have some names Mario Rossi John Doe i would like to convert this name in this format from file with awk Mario,Rossi,"Mario Rossi ",m.rossi_ext@mydomain.com,$TRUE, John,Doe,"John... (7 Replies)
Discussion started by: charli1
7 Replies

10. Shell Programming and Scripting

Modify csv-files with awk

Hello everyone! I have thousands of csv files I have to import into a Database table. As usually the files aren't perfect. For example they have a different number of columns and some weird columns. The second problem is, that I have to add 3 parts of the filename into 3 rows in the... (6 Replies)
Discussion started by: elRonaldo
6 Replies
MENU_MARK(3)						   BSD Library Functions Manual 					      MENU_MARK(3)

NAME
menu_mark, menu_unmark, set_menu_mark, set_menu_unmark -- get or set strings that show mark status for a menu LIBRARY
Curses Menu Library (libmenu, -lmenu) SYNOPSIS
#include <menu.h> char * menu_mark(MENU *menu); char * menu_unmark(MENU *menu); int set_menu_mark(MENU *menu, char *mark); int set_menu_unmark(MENU *menu, char *mark); DESCRIPTION
The menu_mark() function returns a pointer to the character string that is used to mark selected items in the menu. The mark string is set by the set_menu_mark() function. The menu_unmark() function returns a pointer to the character string that is used to indicate a menu items is not selected, this string is set by the set_menu_unmark() function. The mark and unmark strings may be of differing lengths, the room allocated to drawing the mark will be the maximum of the lengths of both the mark and unmark strings. The shorter of the two strings will be left justified and space padded. RETURN VALUES
The functions return one of the following error values: E_OK The function was successful. E_SYSTEM_ERROR There was a system error during the call. E_BAD_ARGUMENT One or more of the arguments passed to the function was incorrect. E_POSTED The menu is already posted. E_CONNECTED An item was already connected to a menu. E_BAD_STATE The function was called from within an initialization or termination routine. E_NO_ROOM The menu does not fit within the subwindow. E_NOT_POSTED The menu is not posted. E_UNKNOWN_COMMAND The menu driver does not recognize the request passed to it. E_NO_MATCH The character search failed to find a match. E_NOT_SELECTABLE The item could not be selected. E_NOT_CONNECTED The item is not connected to a menu. E_REQUEST_DENIED The menu driver could not process the request. SEE ALSO
curses(3), menus(3) NOTES
The header <menu.h> automatically includes both <curses.h> and <eti.h>. BSD
September 10, 1999 BSD
All times are GMT -4. The time now is 12:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy