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
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
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
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
Name,,,,,,,,,,,,,,,,,,,,Domain,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,Contact,Phone,Email,,,,,,,,,,,,,,,,,,,,,,,,,,,,,Location
-----------------------,------------------------------------------------,-------,-----,---------------------------------,------------------------------------
----... (1 Reply)
Discussion started by: sreenath1037
1 Replies
5. Shell Programming and Scripting
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
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
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
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
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
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
LEARN ABOUT SUSE
reconstruct
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)