Sponsored Content
Full Discussion: awk help to mask characters
Top Forums Shell Programming and Scripting awk help to mask characters Post 303025464 by vgersh99 on Friday 2nd of November 2018 04:32:42 PM
Old 11-02-2018
Quote:
Originally Posted by hexram
My idea would be to condition the assignment of an asterisk to $i only when it is a digit, i.e.:
Code:
if($i~="[0-9]")$i="*"

Hope it helps
It's slightly more complicated than that - look at the sample input/output examples.

Last edited by vgersh99; 11-02-2018 at 05:59 PM..
This User Gave Thanks to vgersh99 For This Post:
 

10 More Discussions You Might Find Interesting

1. IP Networking

Subnet mask

Hi, I have about 30 computers for users with subnet mask x.x.x.0, and 25 computers for workers with s.m. x.x.x.128. My server has a s.m. x.x.x.128 so with workers computers I can see my server and all the computers in that s.m., but I can't see the server from the users computers and I need to see... (7 Replies)
Discussion started by: Z0DiaC
7 Replies

2. Programming

password mask in C

Hi, Could any one help me to write a C program for password mask with ******. I mean whatever word i will type that will show on the screen as ***** and should store the correct value in a variable. Thanks in advance Krishna (5 Replies)
Discussion started by: krishna
5 Replies

3. IP Networking

Changing the mask

What is the command to change the mask to 255.255.255.0 The system was set up incorectly and the mask needs to be corrected (1 Reply)
Discussion started by: kkinnon
1 Replies

4. Shell Programming and Scripting

mask ID number

HP-UX 11i v2. #!/bin/sh Hi all. I have a flat file like this with lines like this: |07/19/07|08:26AM|1|CupsCoffee|CupsCo|989898989 |Doe, John Y |THE PLUS CARD - Price| | |Y| | 2.00| I would like to replace the id number (field 6) with a masked... (3 Replies)
Discussion started by: lyoncc
3 Replies

5. Shell Programming and Scripting

Need to Mask Data

I have an requirement. There is a file which has the below contents Unix|123|17-01-2010 .... .... .... .... and so an now each letter has a corresponding predefined mapping letter in order to mask the original data.(for example U = A, n=b, i=c, x=d, same like number 1=9,2=8,3=7. Also... (8 Replies)
Discussion started by: ksmbabu
8 Replies

6. Shell Programming and Scripting

Use awk to print first 6 characters

Hi, i want to use awk to print the first 6 characters of a variable awk -F"|" '$3>0 { print $3 }' z00.unl > z001.unl but $3= 7 digits and i just want to print the first 6 digits. eg 1005779 but i want to print only 100577 (3 Replies)
Discussion started by: dealerso
3 Replies

7. UNIX for Dummies Questions & Answers

how to mask the password ?

Hi All, i am executing peoplesoft sqr command from unix prompt which has the unix id/password as parameter along with other parameters. i want to show whole command in log file but want to mask the id/password field. this command i am executing in shell script. Please suggest.. >sqr sqrname... (2 Replies)
Discussion started by: avi.coep
2 Replies

8. Red Hat

Samba create mask and dir mask on RHEL 4.8

Hi Experts, I'm using samba -3.6.1 on Red Hat Enterprise Linux ES release 4 (Nahant Update 8) ,all seems ok. The issue im facing is as follows. When ever a user creates a file via windows explorer the permissions assgined to the file are as follows -rw-rwxr--+ 1 tom group2 0 Mar 9... (1 Reply)
Discussion started by: maverick_here
1 Replies

9. UNIX for Dummies Questions & Answers

What is mask and effective right mask in setfacl?

Hi Guys, can someone explain what is mask and effective right mask in setfacl and getfacl command with example, unable to get it. (3 Replies)
Discussion started by: Jcpratap
3 Replies

10. Shell Programming and Scripting

awk - checking last three characters

Hello, I am working with some very large files (upwards of 1M records). I have written code to parse out a lot of the data and am using awk rather than a built-in "while read LINE" for performance (I have tested both ways). That said, I now need to read each of these incoming lines, check the ninth... (2 Replies)
Discussion started by: dagamier
2 Replies
Gtk2::Gdk::Input(3pm)					User Contributed Perl Documentation				     Gtk2::Gdk::Input(3pm)

NAME
Gtk2::Gdk::Input METHODS
Gtk2::Gdk::Input->set_extension_events ($window, $mask, $mode) o $window (Gtk2::Gdk::Window) o $mask (Gtk2::Gdk::EventMask) o $mode (Gtk2::Gdk::ExtensionMode) ENUMS AND FLAGS
flags Gtk2::Gdk::EventMask o 'exposure-mask' / 'GDK_EXPOSURE_MASK' o 'pointer-motion-mask' / 'GDK_POINTER_MOTION_MASK' o 'pointer-motion-hint-mask' / 'GDK_POINTER_MOTION_HINT_MASK' o 'button-motion-mask' / 'GDK_BUTTON_MOTION_MASK' o 'button1-motion-mask' / 'GDK_BUTTON1_MOTION_MASK' o 'button2-motion-mask' / 'GDK_BUTTON2_MOTION_MASK' o 'button3-motion-mask' / 'GDK_BUTTON3_MOTION_MASK' o 'button-press-mask' / 'GDK_BUTTON_PRESS_MASK' o 'button-release-mask' / 'GDK_BUTTON_RELEASE_MASK' o 'key-press-mask' / 'GDK_KEY_PRESS_MASK' o 'key-release-mask' / 'GDK_KEY_RELEASE_MASK' o 'enter-notify-mask' / 'GDK_ENTER_NOTIFY_MASK' o 'leave-notify-mask' / 'GDK_LEAVE_NOTIFY_MASK' o 'focus-change-mask' / 'GDK_FOCUS_CHANGE_MASK' o 'structure-mask' / 'GDK_STRUCTURE_MASK' o 'property-change-mask' / 'GDK_PROPERTY_CHANGE_MASK' o 'visibility-notify-mask' / 'GDK_VISIBILITY_NOTIFY_MASK' o 'proximity-in-mask' / 'GDK_PROXIMITY_IN_MASK' o 'proximity-out-mask' / 'GDK_PROXIMITY_OUT_MASK' o 'substructure-mask' / 'GDK_SUBSTRUCTURE_MASK' o 'scroll-mask' / 'GDK_SCROLL_MASK' o 'all-events-mask' / 'GDK_ALL_EVENTS_MASK' enum Gtk2::Gdk::ExtensionMode o 'none' / 'GDK_EXTENSION_EVENTS_NONE' o 'all' / 'GDK_EXTENSION_EVENTS_ALL' o 'cursor' / 'GDK_EXTENSION_EVENTS_CURSOR' SEE ALSO
Gtk2 COPYRIGHT
Copyright (C) 2003-2011 by the gtk2-perl team. This software is licensed under the LGPL. See Gtk2 for a full notice. perl v5.14.2 2012-05-27 Gtk2::Gdk::Input(3pm)
All times are GMT -4. The time now is 09:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy