Sponsored Content
Top Forums UNIX for Dummies Questions & Answers help removing dashes from social security number Post 100609 by nuggetz on Tuesday 28th of February 2006 07:29:45 PM
Old 02-28-2006
Do this:

echo 325-69-5555 | tr '-' ' ' | awk '{print $1$2$3}'

so if you had a file full of these you could also do:

cat fileWithSSN | tr '-' ' ' | awk '{print $1$2$3}'
 

8 More Discussions You Might Find Interesting

1. What is on Your Mind?

Social Security number?

We have now been living in Vence for 3 months. My husband works for a large IT company. How do we get hold of our Social Security numbers and Carte Vitale please? Thanks (4 Replies)
Discussion started by: shanekol
4 Replies

2. Cybersecurity

Does anyone know any ways to protect social security number?

Hello everybody, I have been using my social security number for my taxation purposes. But, I have been recently intimidated by my lawyer that since the crime of identity theft has been on the high I should be careful in using it. I am really concerned about this and need to know whether there are... (1 Reply)
Discussion started by: shanekol
1 Replies

3. Shell Programming and Scripting

Removing Zeros in front of a number

Hi All, I would like to trim the following input. My condition is as long as there's a zero on the left of the number, remove the zeros. Can anybody help me by using sed or awk ? Eg: 0011 => change to => 11 0333 => change to => 333 4444 => No change => 4444 (13 Replies)
Discussion started by: Raynon
13 Replies

4. Shell Programming and Scripting

removing files with certain number in the first row

Hello! I have 32000 files in a directory and want to remove those with first row beging with 0.00; file names are in numbers from 1 through 32000; I have coded the following but it gives me error: while ( i <= 32000 ) if (head -1 $i ==0.00) rm $i end Well, i am sure even if this... (14 Replies)
Discussion started by: nxp
14 Replies

5. Shell Programming and Scripting

Removing columns with dashes

My files look like this I need to remove the columns where dashes are the majority, if any of the sequences has any character in that particular position it should be removed too. The IDs and Freqs should be kept intact. Thus, the resulting file should look like this Thanks in advance (14 Replies)
Discussion started by: Xterra
14 Replies

6. UNIX for Dummies Questions & Answers

Removing setuid option for security.

According to Security standards given in https://www.stanford.edu/dept/as/ia/security/policies_standards/AS_standards/RH_linux_prod_sec_std_1.0.1.html Being a production system i want to implement the same on our server. but when i tried finding other files i got following output. # ls... (5 Replies)
Discussion started by: pinga123
5 Replies

7. Shell Programming and Scripting

Removing cr,lf till number of fields are full

I have a file 1|2|3|4 a|b|c|d 1|2 3|4 a| b| c| d| The file should have 4 fields to load into a database. The file may have cr, lf, or end of line characters. What I want to see as output is 1|2|3|4 a|b|c|d 1|23|4 a|b|c|d I have tried (17 Replies)
Discussion started by: tampatim
17 Replies

8. Shell Programming and Scripting

Removing large number of temp files

Hi All, I am having a situation now to delete a huge number of temp files created during run times approx. 16700+ files. We have never imagined that we will get this this much big list of files during run time. It worked fine for lesser no of files in the list. But when list is huge we are... (7 Replies)
Discussion started by: mad man
7 Replies
bsmrecord(1M)						  System Administration Commands					     bsmrecord(1M)

NAME
bsmrecord - display Solaris audit record formats SYNOPSIS
/usr/sbin/bsmrecord [-d] [ [-a] | [-e string] | [-c class] | [-i id] | [-p programname] | [-s systemcall] | [-h]] DESCRIPTION
The bsmrecord utility displays the event ID, audit class and selection mask, and record format for audit record event types defined in audit_event(4). You can use bsmrecord to generate a list of all audit record formats, or to select audit record formats based on event class, event name, generating program name, system call name, or event ID. There are two output formats. The default format is intended for display in a terminal window; the optional HTML format is intended for viewing with a web browser. OPTIONS
The following options are supported: -a List all audit records. -c class List all audit records selected by class. class is one of the two-character class codes from the file /etc/secu- rity/audit_class. -d Debug mode. Display number of audit records that are defined in audit_event, the number of classes defined in audit_class, any mismatches between the two files, and report which defined events do not have format information available to bsmrecord. -e string List all audit records for which the event ID label contains the string string. The match is case insensitive. -h Generate the output in HTML format. -i id List the audit records having the numeric event ID id. -p programname List all audit records generated by the program programname, for example, audit records generated by a user-space program. -s systemcall List all audit records generated by the system call systemcall, for example, audit records generated by a system call. The -p and -s options are different names for the same thing and are mutually exclusive. The -a option is ignored if any of -c, -e, -i, -p, or -s are given. Combinations of -c, -e, -i, and either -p or -s are ANDed together. EXAMPLES
Example 1: Displaying an Audit Record with a Specified Event ID The following example shows how to display the contents of a specified audit record. % bsmrecord -i 6152 login: terminal login program /usr/sbin/login see login(1) event ID 6152 AUE_login class lo(0x00001000) header-token subject-token text-token error message exit-token Example 2: Displaying an Audit Record with an Event ID Label that Contains a Specified String The following example shows how to display the contents of a audit record with an event ID label that contains the string login. # bsmrecord -e login terminal login program /usr/sbin/login see login(1) event ID 6152 AUE_login class lo(0x00001000) header-token subject-token text-token error message exit-token rlogin program /usr/sbin/login see login(1) - rlogin event ID 6155 AUE_rlogin class lo(0x00001000) header-token subject-token text-token error message exit-token EXIT STATUS
0 Successful operation non-zero Error FILES
/etc/security/audit_class Provides the list of valid classes and the associated audit mask. /etc/security/audit_event Provides the numeric event ID, the literal event name, and the name of the associated system call or program. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsr | +-----------------------------+-----------------------------+ |CSI |Enabled | +-----------------------------+-----------------------------+ |Interface Stability |Unstable | +-----------------------------+-----------------------------+ SEE ALSO
audit_class(4), audit_event(4), attributes(5) DIAGNOSTICS
If unable to read either of its input files or to write its output file, bsmrecord shows the name of the file on which it failed and exits with a non-zero return. If no options are provided, if an invalid option is provided, or if both -s and -p are provided, an error message is displayed and bsm- record displays a usage message then exits with a non-zero return. NOTES
If /etc/security/audit_event has been modified to add user-defined audit events, bsmrecord displays the record format as undefined. SunOS 5.10 14 Jan 2003 bsmrecord(1M)
All times are GMT -4. The time now is 06:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy