Sponsored Content
Top Forums Shell Programming and Scripting awk script to remove spaces - examples don't show up correctly Post 302270562 by Chris_Rivera on Monday 22nd of December 2008 07:32:44 AM
Old 12-22-2008
what is should look like
--------------------------
Code:
1 21007527                          LID,DET,C/S,BULK,PEZ,7 1/2x18 1/2x X     A             1.00000 EA  U J M  M  No
1 21007528                          TRAY,DET,C/S,BULK,PEZ,7 1/2x18 1/2x X    A             1.00000 EA  U J M  M  No
1 820-1625                          LABEL,INFO,BULK C/S,900-0076             A             1.00000 EA  U J M  M  No
2 810-2399                          LABEL,DIESTRIKE,6X4                      A             1.00000 EA  U J M  M  No
1 900-0076-003                      CO,900-0076,C/S,UL,SMT,EN                A            12.00000 EA  U J M  M  No
2 800-0056                          ASSY,CO,SUB,MOUNTING_KIT,(SCREW/ANCHOR)  C   1552      2.00000 EA  U P M  P  No
3 810-1292                          BAG,POLY,CLR,2 X 3                       A   2748      1.00000 EA  L I O  M  No



What it does look like
------------------------
Code:
3 810-2024                              RES,FXD,10_OHM,1%,1/8W,MET               A             1.00000 EA  L I O  M  No
3 810-2373                              RES,FXD,10_OHM,5%,1/8W,CAR               O             1.00000 EA  U J M  M  No
3 810-2453                              CAP,CM,15pf,20%,AXIAL                    B   4136      2.00000 EA  L I O  M  No
3 820-0163                              LABEL,DECAL,.2X.6,WHT,PRINTED,CO/SMK,PCB 0             1.00000 EA  U J M  M  No
4 810-1119                             LABEL,.20X.60,WHT,PAPER,(FACTORY ID)     0             1.00000 EA  U J M  M  No
3 2505-9501                             ASY,SUB,SMOKE CHAMBER                    2   1685      1.00000 EA  U J M  M  No
4 0910-4101                            REFERENCE PLATE                          PR            1.00000 EA  U J M  M  No
4 0910-4102                            SOURCE PLATE                             3             1.00000 EA  L I O  M  No
4 0910-4103                            SOURCE HOLDER                            5             1.00000 EA  U J M  M  No
4 0915-4101                            SOURCE                                   A   2689      1.00000 EA  L I O  M  No
4 0915-4107                            CHAMBER,SMOKE                            PR            1.00000 EA  U J M  M  No
4 910-0118                             CHAMBER,PLASTIC HOUSING                  A   1769      1.00000 EA  L I O  M  No
3 950-0012                              SCHEMATIC,ATWD,BAT,CO/SMOKE,4.5V,UL      19  4304      0.00000 EA  U J M  M  No
2 800-0387                               ASY,SUB,PCBA,CO/SMK,VOICE,UL             B   3293      1.00000 EA  U J M  M  No
3 810-0990                              SPEAKER,MYLAR,8_OHM,36mm                 D   5502      1.00000 EA  U J M  M  No
3 810-1223                              RES,SMD,10K,5%,1/8W,0805                 O             1.00000 EA  U J M  M  No
3 810-1226                              RES,SMD,1K,5%,1/8W,0805                  O             1.00000 EA  U J M  M  No
3 810-1227                              CAP,SMD,47pF,10%                         O             1.00000 EA  U J M  M  No
3 810-1233                              INDUCTOR,200uh,0.5OHM,Radial             0             1.00000 EA  U J M  M  No


Thanks for the instruction on how to keep the form entact.
 

10 More Discussions You Might Find Interesting

1. Linux

Why don't my clock show am or pm?

Is it not possible to get the "Digital" clock in KDE 3.3 to show am or pm? Well I just noticed the plain clock setting is the only one that shows it. (2 Replies)
Discussion started by: CTroxtell21
2 Replies

2. Shell Programming and Scripting

Variable with $ do not show correctly

Hey guys i need help i have a script to push a password to a remote server the only problem is the $ENCRYPT variable has $'s in it (from the encrypted password in the shadow file) and they drop out when apending to the shadow file via the usermod command so $1$Q/6a08n$EoAcBuR/YnoCQC shows up as... (3 Replies)
Discussion started by: insania
3 Replies

3. Shell Programming and Scripting

Don't show keyboard input on terminal

I am developing a script that will run with '/bin/ksh' shell. The script is intended to receive a password by keyboard input, but for security reasons I would like to hide what the user is typing. The keyboard input is being caught by 'read' command. exmaple : echo "Please type your new... (1 Reply)
Discussion started by: marianor31
1 Replies

4. Shell Programming and Scripting

how to remove blank spaces of a file with awk??

hello how to remove blank spaces of a file with awk?? i´m trying awk '{gsub(" ","",$0); print $0;}' filename.txt but it answers syntax error near line first of all i did this for download from netbackup database jobs privilege bpdbjobs -report -M sv88 -gdm -header |cut -c-1024... (4 Replies)
Discussion started by: pabloli150
4 Replies

5. Shell Programming and Scripting

How to remove spaces using awk,sed,perl?

Input: 3456 565 656 878 235 8 4 8787 3 7 35 878 Expected output: 3456 565 656 878 235 8 4 8787 3 7 35 878 How can i do this with awk,sed and perl? (10 Replies)
Discussion started by: cola
10 Replies

6. Shell Programming and Scripting

AWK: Remove spaces before processing each line?

Hi, all I have a file containing the following data: name: PRODUCT_1 date: 2010-01-07 really_long_name: PRODUCT_ABCDEFG I want to get the date (it is "2010-01-07" here), I could use the following code to do that: awk... (6 Replies)
Discussion started by: kevintse
6 Replies

7. Shell Programming and Scripting

Remove spaces / tabs from variable in script

I want to remove extra spaces from variable in aix script. We retrieve the data from oracle database and then print the values. We have a value on 90th position. When we execute the query on sqlplus it shows the length of 90th position as 3, but when we use the same query in aix script it shows... (5 Replies)
Discussion started by: lodhi1978
5 Replies

8. AIX

Showmount don't show NFS4

Configure nfs4 on aix ok i did all chnfsdom #return correct domain chnfs -r /export chnfs -p /export configured and shared pseudo root #etc/exports /export -nfsroot /var/pubblica -exname=/export/pubblica,vers=4,sec=sys:krb5p:krb5i:krb5:dh,rw exportfs -a mount correct mount... (1 Reply)
Discussion started by: Linusolaradm1
1 Replies

9. Shell Programming and Scripting

Why does this awk script not work correctly?

I have a large database with English on the left hand side and Indic words on the left hand. It so happens that since the Indic words have been entered by hand, there are duplicates in the entries. The structure is as under: English headword=Indic gloss,Indic gloss A small sample will... (6 Replies)
Discussion started by: gimley
6 Replies

10. Shell Programming and Scripting

Script to remove spaces and mv a file

I've tried various solutions to move a file name with spaces and nothing seems to work. I need to take a date as input, prepend it to a filename with spaces then remove the spaces and mv the file to the new name. #!/bin/ksh # if (( $# != 1 )) then echo "Usage: `basename $0` <DATE> " ... (5 Replies)
Discussion started by: w_s_s
5 Replies
dnskeygen(1)						      General Commands Manual						      dnskeygen(1)

NAME
dnskeygen - Generates public, private, and shared secret keys for DNS Security SYNOPSIS
/usr/bin/dnskeygen [-DHR] key-size [-zhu] [-p value] [-s value] -n name OPTIONS
Specifies that the key cannot be used for authentication. Specifies that the key cannot be used for encryption. Generates a DSA/DSS key. The size (in bytes) must be one of the following values: 512, 576, 640, 704, 768, 832, 896, 960, or 1024. Uses a large exponent for key generation (RSA only). Generates an HMAC-MD5 key. The size (in bytes) must be between 1 and 512. Generates a Host key for a host or ser- vice. Specifies the name of the key that you generate. Sets the protocol field value. The default is 2 (E-mail) for Host keys and 3 (DNS Security) for all others. Generates an RSA key. The size (in bytes) must be between 512 and 4096. Sets the strength value with which this key signs DNS records. The default is 1 for Zone keys and 0 for all others. Generates a User key for E-mail or another purpose. Generates a Zone key for DNS validation. When the dnskeygen command is executed with no options, it generates output containing a list of its options. DESCRIPTION
Use the dnskeygen utility to generate and maintain keys for DNS Security. The utility can generate public and private keys to authenticate zone data and shared secret keys to use for Request/Transaction signatures. RESTRICTIONS
Although the dnskeygen command supports the full range of options offered by the Internet Software Consortium's (ISC) original program, at this time, the operating system supports only the keys it generates for secure dynamic updates and zone transfers. See bind_manual_setup(7) and the Network Administration guide for more information about these features. EXAMPLES
In the following example, an administrator creates a private key for authentication of DNS dynamic updates (the forward slash indicates line continuation): # dnskeygen -H 1024 -h -c -n pubnet-enterprise_update ** Adding dot to the name to make it fully qualified domain name** Generating 1024 bit HMAC-MD5 Key for pubnet-enterprise_update. Generated 1024 bit Key for pubnet-enterprise_update. id=0 alg=157 flags=16897 # ls K* Kpubnet-enterprise_update.+157+00000.key Kpubnet-enterprise_update.+157+00000.private FILES
The dnskeygen command generates two files in the directory in which it is executed: Public key file. Private key file. SEE ALSO
Commands: named(8) Files: named.conf(4) Others: bind_manual_setup(7) Network Administration dnskeygen(1)
All times are GMT -4. The time now is 01:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy