Sponsored Content
Full Discussion: awk stuff
Top Forums Shell Programming and Scripting awk stuff Post 302913988 by Nandy on Thursday 21st of August 2014 08:31:05 AM
Old 08-21-2014
awk stuff

Hi,

My input file data will be
Code:
|ABCD|EFGH|IJKL|MNOP
|ABCD|EF\|GH|IJKL|MNOP

I am expecting output ,
Code:
|"ABCD"|"EFGH"|"IJKL"|"MNOP"
|"ABCD"|"EF|GH"|"IJKL"|"MNOP"

Note : The change basically the pipe deilmited file does contain | as value for some of the column but | will come with escape char \ always when it will be a value.

Please provide your ideas. i am looking for not only awk .. something different also welcome.

thanks in advance for your inputs

Last edited by Franklin52; 08-21-2014 at 09:52 AM.. Reason: Please use code tags
 

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Simple stuff.

I hacked my TIVO a few months ago. I made a computer specifically for this, but I only used a UNIX boot disk to get all the TIVO goodies to work. I am intersted in getting some version of UNIX on this machine and getting it onto my network. I only want to do some simple file transfers, maybe... (1 Reply)
Discussion started by: IamJAWA
1 Replies

2. Windows & DOS: Issues & Discussions

weird stuff

I coudln't think of another topic to post this under as the OS on the system is XP pro. Ok here is the go. I'm upgrdaing a mates computer. A AMD 1200Mhz and well it wouldn't boot from the CD to do a fresh install (By upgrade I mean OS with complete new install). So I opened up the box and... (4 Replies)
Discussion started by: woofie
4 Replies

3. Shell Programming and Scripting

A schoolboyish stuff

Hi , This is a pretty simple sed command i found when i was checking out one of the codes of my colleague . sed -e 's/\*.*\) \(\ <1*e\ >\) \(*.*\)/\2/' When i tried this on a few text files it was displaying the entire line. If this was to display entire line why sweat out on a sed . Does... (3 Replies)
Discussion started by: kinny
3 Replies

4. Shell Programming and Scripting

Please help with monitoring stuff

Hi, I am trying to write a script to do monitoring kind of stuff, requirement - when a server is given a start it updates a file called server.log, I need to keep on grepping the word "Running" and as soon as it comes , script should be exited with the message , "Server came up... (2 Replies)
Discussion started by: sunilmenhdiratt
2 Replies

5. Programming

More Arduino Stuff...

HI all... (Apologies for any typos.) To add to Neo's Arduino subject matter I have decided to upload this in ".zip" format. Ignore "*.info" files these are AMIGA icons only and also the "HAM" drawer as these are photos in ancient AMIGA HAM modes. I have noticed that there are current... (6 Replies)
Discussion started by: wisecracker
6 Replies
dsmemberutil(1) 					    BSD General Commands Manual 					   dsmemberutil(1)

NAME
dsmemberutil -- various operations for the membership APIs, including state dump, check memberships, UUIDs, etc. SYNOPSIS
dsmemberutil [-v] [-h] command [options] DESCRIPTION
dsmemberutil is a program that implements the membership API calls in a command line utility. FLAGS
A list of flags and their descriptions: -h Lists the options for calling dsmemberutil -v Causes dsmemberutil to operate in verbose mode. COMMANDS
The action of each command is described below: getuuid -ugUGsS value Takes any of the options and returns the associated UUID. getid -UGsSX value Takes any of the options and returns the associated UID or GID depending on option provided. getsid -ugUGX value Takes any of the options and returns the associated SID. checkmembership -uUxs param -gGXS param Returns if a user or group with the associated option is a member of the group. flushcache Flushes the current membership cache. Legacy commands such as dumpstate and statistics are gone. See odutil(1) for show cache and statistics operations. A list of options available. In some cases -xX and -sS can be used synonymously due to nature of the value. -u uid Using user with UID -U name Using user with name -s sid Using user with SID -x uuid Using user with UUID -g gid Using group with GID -G name Using group with name -S sid Using group with SID -X uuid Using group with UUID EXAMPLES
Get a user's uuid: % dsmemberutil getuuid -u 501 EEA4F2F6-B268-49E7-9C6F-E3C4A37DA4FD Get a group's uuid % dsmemberutil getuuid -g 0 ABCDEFAB-CDEF-ABCD-EFAB-CDEF00000000 Get a user's or group's id from a uuid % dsmemberutil getid -X ABCDEFAB-CDEF-ABCD-EFAB-CDEF0000000C gid: 12 Check a user's membership in a group (using UID and GID) % dsmemberutil checkmembership -u 501 -g 0 user is not a member of the group Check a user's membership in a group (using names) % dsmemberutil checkmembership -U root -G wheel user is a member of the group SEE ALSO
odutil(1), dseditgroup(1), dscacheutil(1) Darwin Jan 1, 2007 Darwin
All times are GMT -4. The time now is 06:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy