Sponsored Content
Top Forums Shell Programming and Scripting [Solved] Howto remove extra space in the file Post 302816769 by Jotne on Tuesday 4th of June 2013 02:00:25 PM
Old 06-04-2013
This is a very commonly used solution. It reconstruct every field setting default one space as filed separator.
{$1=$1} reconstruct
1 print every line
This User Gave Thanks to Jotne For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

remove extra lines in the file

Hi, I have some files, with some extra lines in weird characters on the top and bottom of the. I want to get rid of those line. Is there a way I can do that? example of the input file. I want to get rid of those lines in bold  ... (8 Replies)
Discussion started by: CamTu
8 Replies

2. HP-UX

[Solved] Howto change subdirectory easily using cd

Hi all, how to change the path easily from /u01/oracle/oradata/newdb/tab >cd olddb /u01/oracle/oradata/olddb/tab > or /u01/oracle/oradata/newdb/tab >cd u05 /u05/oracle/oradata/newdb/tab > I am lazy for typing the abs. path again... As I know there is some "tips" in doing this. ... (2 Replies)
Discussion started by: freddy1228
2 Replies

3. Shell Programming and Scripting

m4 adds extra space at top of file.

I have used m4 in the past to generate source code where aesthetics and space were of no consequence . Now I am using it to generate script and program templates . So here is an excerpt from my m4 file for producing a generic bash script: dnl `$Id$' define(`START_SCRIPT',`#!/bin/bash... (8 Replies)
Discussion started by: Bubnoff
8 Replies

4. Shell Programming and Scripting

shell script to remove extra commas from CSV outp file

Name,,,,,,,,,,,,,,,,,,,,Domain,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,Contact,Phone,Email,,,,,,,,,,,,,,,,,,,,,,,,,,,,,Location -----------------------,------------------------------------------------,-------,-----,---------------------------------,------------------------------------ ----... (1 Reply)
Discussion started by: sreenath1037
1 Replies

5. Shell Programming and Scripting

How to remove extra double quotes from string in a delimited file??

Hi Unix Gurus.. I am new to Unix. Please help me. The file I am getting is as follows: Input File "2011-07-06 03:53:23","0","I","NOT SET ",,,,"123985","SAW CUT CONCRETE SLAB 20"THICK",,"98.57","","EACH","N" "2011-07-06 03:53:23","0","I","NOT SET ",,,,"204312","ARMAFLEX-1 3/8 X... (2 Replies)
Discussion started by: BICC
2 Replies

6. UNIX for Advanced & Expert Users

howto remove meta info about MP4 or FLV file downloaded off Youtube?

Hi I tried a tool called mediainfo > brew info media-info media-info 0.7.51 http://mediainfo.sourceforge.net Depends on: pkg-config /usr/local/Cellar/media-info/0.7.51 (3 files, 14M) http://github.com/mxcl/homebrew/commits/master/Library/Formula/media-info.rb Got details from a test... (3 Replies)
Discussion started by: slashdotweenie
3 Replies

7. Shell Programming and Scripting

[Solved] remove file extension

Hi, I have some files with some extension e.g. abc.xml.REMOVE,xyz.xml,efg.xml.REMOVE . I have to remove the .REMOVE extension. I can display it using the below script but cannot rename it. ls -l|sed 's/\.REMOVE//' How can I rename this? Thanks in advance (7 Replies)
Discussion started by: babom
7 Replies

8. UNIX for Dummies Questions & Answers

[Solved] Help to remove a line from a file

Hi, I just upgraded one my server to latest version RHEL, I have many users who will do SSH from another server. I wanted to update all of the users home directory and remove the security key. For example. /home/XYZ/.ssh/known_hosts and remove this hostsname. Please see below and advise.... (2 Replies)
Discussion started by: samnyc
2 Replies

9. UNIX Desktop Questions & Answers

To remove the extra spaces at the end of each line in a file

I have a file of about 10k records and eace line is having an extra space of 5 byte at the end.. Iwant to remove the extra spaces at the end of each line.. Can someone please help me out.. I tried using sed command and its not working... can someone please help me out. (3 Replies)
Discussion started by: rammohan
3 Replies

10. Shell Programming and Scripting

Extra Space in output - remove

Hi All I am trying to perform the below operation -count=`cat abc.txt | wc -l` echo$count 5 Head=Start"$DATE"00000"$count"File echo $HEAD START15020300000 5File There is a space coming before 5 which is not needed . How to ignore that . (4 Replies)
Discussion started by: honey26
4 Replies
RECONSTRUCT(8)						      System Manager's Manual						    RECONSTRUCT(8)

 *

NAME
reconstruct - reconstruct mailboxes SYNOPSIS
reconstruct [ -C config-file ] [ -p partition ] [ -x ] [ -r ] [ -f ] [ -k ] [ -s ] [ -g ] [ -G ] mailbox... reconstruct [ -C config-file ] -m DESCRIPTION
Reconstruct rebuilds one or more IMAP mailboxes. When invoked with the -m switch, it rebuilds the master mailboxes file. It can be used to recover from almost any sort of data corruption. If Reconstruct can find existing header and index files, it attempts to preserve any data in them that is not derivable from the message files themselves. The state reconstruct attempts to preserve includes the flag names, flag state, and internaldate. Reconstruct derives all other information from the message files. Reconstruct reads its configuration options out of the imapd.conf(5) file unless specified otherwise by -C. Any mailbox directory under- neath the path specified in the partition-news configuration option is assumed to be in news format. Reconstruct does not adjust the quota usage recorded in any quota root files. After running reconstruct, it is advisable to run quota(8) with the -f switch in order to fix the quota root files. OPTIONS
-C config-file Read configuration options from config-file. -p partition Search for the listed (non-existant) mailboxes on the indicated partition. Create the mailboxes in the database in addition to reconstructing them. (not compatible with the use of wildcards) -x When processing a mailbox which is not in the mailbox list (e.g. via the -p or -f options), do not import the metadata from the mailbox, instead create it anew (this specifically affects at least the mailbox's seen state unique identifier, user flags, and ACL). -r Recursively reconstruct all sub-mailboxes of the mailboxes or mailbox prefixes given as arguments. -f Examine the filesystem underneath mailbox, adding all directories with a cyrus.header found there as new mailboxes. Useful for restoring mailboxes from backups. -k Preserve the cyrus.expunge file and the corresponding message files instead of deleting them. -s Adds synchronization records to the log, so the synchronization service can replicate the changes. -g Clear existing or regenerated GUIDs for all messages. -G Force regeneration of GUIDs for all messages. -m NOTE: CURRENTLY UNAVAILABLE Rebuild the mailboxes file. Use whatever data in the existing mailboxes file it can scavenge, then scans all partitions listed in the imapd.conf(5) file for additional mailboxes. EXAMPLES
You want to reconstruct the index files for a user, you have recovered a deleted mail file from backup and given it a suitable name (eg user/ben-lacy/33.), but it is not visible since it is not indexed: reconstruct -r user.ben-lacy If you have the unixhierarchysep:yes option set in /etc/imapd.conf you would need to run: reconstruct -r user/ben.lacy FILES
/etc/imapd.conf CMU
Project Cyrus RECONSTRUCT(8)
All times are GMT -4. The time now is 03:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy