Sponsored Content
Top Forums Shell Programming and Scripting Delete spaces in between fields Post 302069942 by guiguy on Thursday 30th of March 2006 10:18:12 AM
Old 03-30-2006
Network Delete spaces in between fields- One Change

Hello Again,

One little change, hopefully this would be an easy one.

The very data element in my file is "1" or "space" and I need this space in the very last field.

I am sure all of you can come up with a solution.

thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

delete white spaces

hi all... i have the next question: i have a flat file with a lot of records (lines). Each record has 10 fields, which are separated by pipe (|). My problem is what sometimes, in the first record, there are white spaces (no values, nothing) in the beginning of the record, like this: ws ws... (2 Replies)
Discussion started by: DebianJ
2 Replies

2. Shell Programming and Scripting

align several fields and fill spaces with zero

hi all, i have a big problem, and i donīt know what to do. i have a flat file with several fields, which are separated by ";" like this: 5656838-7B;97030000-7;*;V16106133 ;1;1; 4612062-0B;97030000-7;*;C14038149 ;1;2; 8044938-0B;97030000-7;*;V16034219 ;1;2; where B is a blank space. ... (2 Replies)
Discussion started by: DebianJ
2 Replies

3. Shell Programming and Scripting

How can i remove spaces in between the fields in a file

Hey , I have a file and it's having spaces for some of the fields in it. Like the one below. I want to remove the spaces in them through out the file. The spaces occur randomly and i can't say which field is having space. So please help. Here is sample file with spaces after 5th field. (3 Replies)
Discussion started by: dsravan
3 Replies

4. UNIX for Dummies Questions & Answers

Find fields with no spaces in value

This is what I need to do I have a file that has a field with values like this 1111 2222 3333 4444 55555 666 333333333 444444444 I need for my command to out put only those fields that do not have spaces in them. So my output for the above file would be 333333333 444444444 how... (10 Replies)
Discussion started by: alfredo123
10 Replies

5. Shell Programming and Scripting

remove extra spaces between fields

Hi, I have a source file as mentioned below: I want to remove all the extra spaces between the fields. a b--------|sa df-------|3232---|3 sf sa------|afs sdf-----|43-----|33 a b c------|adfsa dsf---|23-32|23 *Here '-' idicates spaces Now, I want output as below: a b|sa df|3232|3... (7 Replies)
Discussion started by: srilaxmi
7 Replies

6. Shell Programming and Scripting

remove blank spaces from fields

Hi Friends, I have large volume of data file as shown below. Beganing or end of each filed, there are some blank spaces. How do I remove those spaces? AAA AAA1 | BBB BB1 BB2 |CC CCCC DDDD DD | EEEEEEE EEEEEEEE | FFF FFFFFF FFFF GG GGGGGG |HH HH ... (3 Replies)
Discussion started by: ppat7046
3 Replies

7. Shell Programming and Scripting

awk ignores fields with only spaces or empty

Hi, Does any one know how to avoid the scenario where awk ignores the fields having only spaces or empty fields? for instance, Data: "a","b","c","d",""," " code: awk -F, '{ print NF }' File the output I get is 4 instead of 6 do you know how to avoid this? (6 Replies)
Discussion started by: ahmedwaseem2000
6 Replies

8. Shell Programming and Scripting

How to Use Sed Command to replace white spaces with comma from between two fields - Mayank

SHELL SCRIPT Hi I have a file in the following format Mayank Sushant Dheeraj Kunal ARUN Samir How can i replace the white space in between and replace them with a comma?? The resultant output should be Mayank,Sushant Dheeraj,Kunal ARUN,Samir i tried using sed -e... (8 Replies)
Discussion started by: mayanksargoch
8 Replies

9. Shell Programming and Scripting

Cutting fields from lines with multiple spaces

Please see the following code, between "status" and "OK" exists many spaces, I want to get status OK . how to ignore multi spaces? If tab exists in the spaces, how to ignore it ? Is there other commands can replace cut? $ echo 'drv status OK'| cut... (3 Replies)
Discussion started by: 915086731
3 Replies

10. Shell Programming and Scripting

How to preserve spaces in input fields with awk?

I'm trying to do something pretty simple but its appears more complicated than expected... I've lines in a text file, separated by the comma and that I want to output to another file, without the first field. Input file: file1,item, 12345678 file2,item, 12345678 file2,item, ... (8 Replies)
Discussion started by: Armoric
8 Replies
LSROLL(1p)						User Contributed Perl Documentation						LSROLL(1p)

NAME
lsroll - List the rollrecs in a DNSSEC-Tools rollrec file SYNOPSIS
lsroll [options] <rollrec-files> DESCRIPTION
This script lists the contents of the specified rollrec files. All rollrec files are loaded before the output is displayed. If any rollrecs have duplicated names, whether within one file or across multiple files, the later rollrec will be the one whose data are displayed. OUTPUT FORMATS
The output displayed for each zone in a rollrec file depends on the selected records, the selected attributes, and the selected output format. Each option in these option groups is described in detail in the next section. The three base output formats, along with the default -skip format, are described here. The -terse option indicates that a minimal amount of output is desired; the -long option indicates that a great deal of output is desired. The record-selection and attribute-selection options may be used in conjunction with -terse to display exactly the set of rollrec fields needed. The default output format is that used when neither -terse nor -long is given, and is a middle ground between terse and long output. If the -skip option is given, then the default output format is a little more restricted than the normal default. Some rollrec fields don't make sense in the context of a skip records, and so are given as "---". These fields are the KSK rollover phase, the ZSK rollover phase, the TTL value, and the phase start. The table below shows the fields displayed for each output format. rollrec field default terse long skip ------------- ------- ----- ---- ---- rollrec name yes yes yes yes rollrec type no no yes no zonename no no yes yes zone file yes no yes yes zonegroup no no yes no keyrec file yes no yes yes KSK phase yes no yes no ZSK phase yes no yes no administrator no no yes no directory no no yes no logging level no no yes no TTL value no no yes no display flag no no yes no phase start no no yes no last KSK rollover no no yes no last ZSK rollover no no yes no zonesigner arguments no no yes no The rollrec name field is often the same as its zonename, but this is not necessarily the case. The rollrec name can contain spaces, while the zonename can't. For this reason, lsroll displays the rollrec name in quotes, even if the name contains no spaces. This is intended to allow for easier parsing by other programs. OPTIONS
There are three types of options recognized by lsroll: record-selection options, attribute-selection options, and output-format options. Each type is described in the subsections below. Record-selection Options These options select the records that will be displayed by lsroll. By default, all records will be displayed; selecting one or the other of these options will restrict the records shown. In order to simplify the lsroll code and keep it easily understandable, these options are mutually exclusive. -roll List all "roll" records in the rollrec file. -skip List all "skip" records in the rollrec file. Attribute-selection Options These options select the attributes of the records that will be displayed by lsroll. -type Include each rollrec record's type in the output. The type will be either "roll" or "skip". -zonename The record's zonename is included in the output. The zonename is distinct from the record's rollrec name, which is always included in the output. While these two fields are often the same, they need not be. In split-zone zones, the rollrec names must be different, while the zonename field is the same. -zonefile The record's zonefile is included in the output. This field is part of the default output. -zg The record's zonegroup is included in the output, enclosed in double quotes. If a rollrec does not contain a zonegroup, then the value "" is given. -keyrec The record's keyrec file is included in the output. This field is part of the default output. -kskphase The record's KSK rollover phase are included in the output. If this option is given with the -zskphase option, then the output will follow the format described for the -phases option. This field is part of the default output. -zskphase The record's ZSK rollover phase are included in the output. If this option is given with the -kskphase option, then the output will follow the format described for the -phases option. This field is part of the default output. -phases The record's KSK and ZSK rollover phases are included in the output. The listing is given with the KSK phase first, followed by the ZSK phase. Examples of output from this option are: KSK phase ZSK phase output 0 0 0/0 3 0 3/0 0 5 0/5 -admin The record's administrator value is included in the output. If an administrator value is not included in a rollrec, then the value "(defadmin)" will be given. -directory The name of the directory that holds the zone's files is included in the output. If a zone directory is not included in a rollrec, then the value "(defdir)" will be given. -loglevel The rollerd logging level for this zone. This value may be given in the rollrec file in either the textual or numeric form. The textual form of the logging level will be displayed, not the numeric. If a logging level value is not included in a rollrec, then the value "(deflog)" will be given. If an undefined logging level value is included in a rollrec, then the value "(unknownlog)" will be given. -ttl The record's TTL value is included in the output. -display The record's display flag, used by blinkenlights, is included in the output. -phstart The record's rollover phase is included in the output. If no rollover has yet been performed for this zone, an empty date is given. -lastksk The record's last KSK rollover date is included in the output. If no KSK rollover has yet been performed for this zone, an empty date is given. -lastzsk The record's last ZSK rollover date is included in the output. If no ZSK rollover has yet been performed for this zone, an empty date is given. -zsargs The record's user-defined zonesigner arguments are included in the output. If no arguments have been set for this zone, then the value "(none)" is given. -zonegroup The zonegroups defined in the rollrec are listed, enclosed in double quotes. All other rollrec fields are ignored. If the -long option is specified, then each zonegroup name will be accompanied by the number of rollrec entries in that zonegroup. Output-format Options These options select the type of output that will be given by lsroll. -count Only a count of matching keyrecs in the rollrec file is given. -headers Display explanatory column headers. -terse Terse output is given. Only the record name and any other fields specifically selected are included in the output. -long Long output is given. All record fields are included. -help Display a usage message. -Version Displays the version information for lsroll and the DNSSEC-Tools package. COPYRIGHT
Copyright 2005-2012 SPARTA, Inc. All rights reserved. See the COPYING file included with the DNSSEC-Tools package for details. AUTHOR
Wayne Morrison, tewok@tislabs.com SEE ALSO
blinkenlights(8), rollchk(8), rollinit(8), rollerd(8) Net::DNS::SEC::Tools::rollrec.pm(3) file-rollrec(5) perl v5.14.2 2012-06-21 LSROLL(1p)
All times are GMT -4. The time now is 04:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy