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
sccs-cdc(1)							   User Commands						       sccs-cdc(1)

NAME
sccs-cdc, cdc - change the delta commentary of an SCCS delta SYNOPSIS
/usr/ccs/bin/cdc -rsid [-mmr-list] [ -y [comment]] s.filename... DESCRIPTION
cdc annotates the delta commentary for the SCCS delta ID (SID) specified by the -r option in each named s.file. If the v flag is set in the s.file, you can also use cdc to update the Modification Request (MR) list. If you checked in the delta, or, if you own the file and directory and have write permission, you can use cdc to annotate the commentary. Rather than replacing the existing commentary, cdc inserts the new comment you supply, followed by a line of the form: *** CHANGED *** yy/mm/dd hh/mm/ss username above the existing commentary. If a directory is named as the s.filename argument, the cdc command applies to all s.files in that directory. Unreadable s.files produce an error; processing continues with the next file (if any). If `-' is given as the s.filename argument, each line of the standard input is taken as the name of an SCCS history file to be processed, and the -m and -y options must be used. OPTIONS
-rsid Specify the SID of the delta to change. -mmr-list Specify one or more MR numbers to add or delete. When specifying more than one MR on the command line, mr-list takes the form of a quoted, space-separated list. To delete an MR number, precede it with a ! character (an empty MR list has no effect). A list of deleted MRs is placed in the comment section of the delta commentary. If -m is not used and the stan- dard input is a terminal, cdc prompts with MRs? for the list (before issuing the comments? prompt). -m is only useful when the v flag is set in the s.file. If that flag has a value, it is taken to be the name of a program to validate the MR num- bers. If that validation program returns a non-zero exit status, cdc terminates and the delta commentary remains unchanged. -y[comment] Use comment as the annotation in the delta commentary. The previous comments are retained; the comment is added along with a notation that the commentary was changed. A null comment leaves the commentary unaffected. If -y is not specified and the standard input is a terminal, cdc prompts with comments? for the text of the notation to be added. An unescaped NEW- LINE character terminates the annotation text. EXAMPLES
Example 1: Changing the annotated commentary The following command: example% cdc -r1.6 -y"corrected commentary" s.program.c produces the following annotated commentary for delta 1.6 in s.program.c: D 1.6 88/07/05 23:21:07 username 9 0 00001/00000/00000 MRs: COMMENTS: corrected commentary *** CHANGED *** 88/07/07 14:09:41 username performance enhancements in main() FILES
z.file temporary lock file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWsprot | +-----------------------------+-----------------------------+ SEE ALSO
sccs(1), sccs-admin(1), sccs-comb(1), sccs-delta(1), sccs-help(1), sccs-prs(1), sccs-prt(1), sccs-rmdel(1), what(1), sccsfile(4), attributes(5) DIAGNOSTICS
Use the SCCS help command for explanations (see sccs-help(1)). SunOS 5.10 1 Nov 1999 sccs-cdc(1)
All times are GMT -4. The time now is 08:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy