Sponsored Content
Top Forums Shell Programming and Scripting Fixing corrupted vcard files. Post 302246483 by dotancohen on Monday 13th of October 2008 08:34:58 PM
Old 10-13-2008
Fixing corrupted vcard files.

KDE's Kontact PIM breaks quoted-printable vcard files because it
linebreaks in the middle of a word. Take this text for example:
Code:
NOTE;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=D7=A9=D7=95=D7=A8=D7=94 =D7=A
 8=D7=90=D7=A9=D7=95=D7=A0=D7=94.\n=D7=94=D7=A9=D7=95=D7=A8=D7=94 =D7=94=D7=
 A9=D7=A0=D7=99=D7=94 =D7=9B=D7=\n

The whole thing should be on one line, and the spaces at the beginning
of each line shouldn't be there at all. I have a directory with 422
files corrupted like this.

Can a shell script go through a directory of files and replace each instance
of "newline-space" with nothing? The system is Ubuntu 8.04 with KDE if
it matters. Thanks.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Corrupted files from Windows to Unix Sco

I downloaded some applications from CD on a windows2000 PC to a Unix Sco machine using the WS-FTP program. When I tried to run the applications on the Unix machines I got an error. The files must have been corrupted in the process of transferring files from a Windows 2000 to a Unix Sco... (9 Replies)
Discussion started by: BAM
9 Replies

2. UNIX for Dummies Questions & Answers

Extracting files from corrupted tape

I've got a backuptape in cpio format that was accidentally overwritten with a very small batch file. As I assume that the cpio header has been overwritten, I cannot extract files from the backup in the conventional manner: ( cpio -itv </dev/rct0 cpio: this is not a cpio file, bad header) ... (0 Replies)
Discussion started by: mart4179
0 Replies

3. Linux

fixing with sed

I am trying to replace the value of $f3 but its not working . I don't know what I am missing here . cat dim_copy.20080516.sql | grep -i "create view" | grep -v OPSDM002 | while read f1 f2 f3 f4 f5 f6 f7 f8 f9 do echo " $f3 " sed -e... (13 Replies)
Discussion started by: capri_drm
13 Replies

4. Solaris

PAM login library files corrupted, have ILOM, can I get root?

I was installing sfw sudo and its dependencies (libiconv, libintl, libgcc)on Solaris 10, running on an x86 x4200 and I corrupted some PAM library files. It's a standard Solaris 10 base install, with some added software & libraries from a vendor. I am on console trying to get root access back,... (1 Reply)
Discussion started by: Mariognarly
1 Replies

5. HP-UX

WinRAR files are corrupted after FTP

In my Windows 2003 server machine I have a winrar or winzip file that i around 3GB. This zip/rar file is ftped to a unix mahine (HPUX) . FTP is successful. But when it get this file to check if its has been ftped correctly, the file is corrupted. Is there something wrong that i am doing while... (4 Replies)
Discussion started by: maroli
4 Replies

6. Shell Programming and Scripting

Help fixing awk code to print values from 2 files

Hi everyone, Please help on this: I have file1: <file title="Title 1 and 2"> <report> <title>Title 1</title> <number>No. 1234</number> <address>Address 1</address> <date>October 07, 2009</date> <description>Some text</description> </report> ... (6 Replies)
Discussion started by: Ophiuchus
6 Replies

7. Shell Programming and Scripting

help fixing awk statement

awk "BEGIN {if($MessageREAD<$ThresholdW) {print \"OK\" ; exit 0} else if(($MessageREAD>=$ThresholdW) && ($MessageREAD<$ThresholdC)) {print \"WARNING\" ; exit 1}" else if($MessageREAD<=$ThresholdC) {print \"CRITICAL\" ;... (4 Replies)
Discussion started by: SkySmart
4 Replies

8. Hardware

Files getting corrupted

$ uname -a Linux darksun 3.13.0-36-generic #63-Ubuntu SMP Wed Sep 3 21:30:45 UTC 2014 i686 athlon i686 GNU/Linux My files are getting corrupted on a frequent basis. $ sudo fdisk -l /dev/sda Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders, total... (10 Replies)
Discussion started by: rlopes
10 Replies
KBUILDSYCOCA4(8)						 KDE User's Manual						  KBUILDSYCOCA4(8)

NAME
kbuildsycoca4 - Rebuilds the system configuration cache. SYNOPSIS
kbuildsycoca4 [[--nosignal] | [--noincremental] | [--checkstamps] | [--nocheckfiles] | [--global] | [--menutest] | [--track menu-id] | [--help] | [--help-qt] | [--help-kde] | [--help-all] | [--author] | [-v, --version] | [--license]] DESCRIPTION
kbuildsycoca4, as part of the KDE command line tools ensures the proper operation of KDE by reading in all the .desktop, .xml, and .protocol files to construct a binary database. KDE itself accesses this database during operation to provide configuration information a program needs to run. This tool is part of ksycoca4, which stands for KDE System Configuration Cache OPTIONS
--nosignal Do not signal applications to update --noincremental Disable incremental update, re-read everything --checkstamps Check file timestamps --nocheckfiles Disable checking files (dangerous) --global Create global database --menutest Perform menu generation test run only --track menu-id Track menu id for debug purposes --help Show help about options --help-qt Show Qt specific options --help-kde Show KDE specific options --help-all Show all options --author Show author information -v , --version Show version information --license Show license information USAGE
A standard way to run this program is by simply specifying the following command at the prompt kbuildsycoca4 FILES
/var/tmp/kde-$USER/ksycoca4 The default directory where the cache files are stored. ENVIRONMENT VARIABLES
$KDEDIRS Specifies which directories are part of the KDE installations $KDESYCOCA Specifies the path to the sycoca database file SEE ALSO
kdeinit4 BUGS
There are probably tons of bugs. Use bugs.kde.org[1] to report them. AUTHOR
Darian Lanx <content@openprojects.net> Author. NOTES
1. bugs.kde.org http://bugs.kde.org 1.1 (KDE 4.4) 2010-01-04 KBUILDSYCOCA4(8)
All times are GMT -4. The time now is 07:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy