Sponsored Content
Top Forums UNIX for Dummies Questions & Answers want to remove " in a file and delete empty spaces Post 302214293 by vikram2008 on Sunday 13th of July 2008 05:01:38 AM
Old 07-13-2008
sorry i tried searching but i couldn't find the desired result. may be i was not searching proper way . Many thanks mate ..
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Delete an empty file from dir.

Hi, I have an dir which has 50K file, some of them are empty. I want to delete the empty file from the dir. I am planning to use the following command. ls -l | grep " 0 " | awk '{print $9}' I can copy this to an file and then how do I use this file to delete the empty files.... Any help... (2 Replies)
Discussion started by: Script40
2 Replies

2. Shell Programming and Scripting

How to remove "New line characters" and "spaces" at a time

Dear friends, following is the output of a script from which I want to remove spaces and new-line characters. Example:- Line1 abcdefghijklmnopqrstuvwxyz Line2 mnopqrstuvwxyzabcdefghijkl Line3 opqrstuvwxyzabcdefdefg Here in above example, at every starting line there is a “tab” &... (4 Replies)
Discussion started by: anushree.a
4 Replies

3. Shell Programming and Scripting

script to read a line with spaces bet " " and write to a file

Hi, I need a command in UNIX KSH below is the description... MAPPING DESCRIPTION ="Test Mapping for the calid inputs" ISVALID ="YES" NAME ="m_test_xml" OBJECTVERSION ="1" VERSIONNUMBER ="1" unix ksh command to read the DESCRIPTION and write to a file Test Mapping for the calid inputs... (3 Replies)
Discussion started by: perlamohan
3 Replies

4. Shell Programming and Scripting

delete empty spaces at specific column

Hi All, If anybody could help me with my scenario here. I have a statement file. Example of some content: DATE DESC Debit Credit Total Rate 02-Jan-08 Lodgement 200.00 1200.00 2.51 14-Sep-07 Withdrawal 50.00 1000.00 ... (8 Replies)
Discussion started by: yonez
8 Replies

5. Shell Programming and Scripting

How to delete all leading empty lines in a file?

How to delete all leading empty lines in a file? $>cat input.txt test Test $> output file should be test Test $> (14 Replies)
Discussion started by: johnveslin
14 Replies

6. Shell Programming and Scripting

The "read" command misinterprets file names containing spaces

The "read" command, which is built into bash, takes words from the standard input. However, "read" is not good at taking file names if the file names contain spaces. I would like my bash script to ask the user to enter file names, which may contain spaces. Can you think about any technique for... (14 Replies)
Discussion started by: LessNux
14 Replies

7. Shell Programming and Scripting

Remove trailing empty spaces within a quote

Platform: Oracle Linux 6.5 I have a file with hundreds of values enclosed in single quotes like below. I want the trailing empty spaces before the ending quote to be removed. Expected output shown below. Can this be done using good old vi editor ? Or should I use sed or awk for this ? $ cat... (4 Replies)
Discussion started by: kraljic
4 Replies

8. Shell Programming and Scripting

Delete everything after empty line in file

Hello, I am trying to remove everything coming after empty line under ubuntu14.04. How may I do it? file: aaa 020390 bb00id3 c03wisi 209dl x092sia 0290s I expect: aaa 020390 bb00id3 c03wisi (3 Replies)
Discussion started by: baris35
3 Replies
ZZIP_ENTRY_FINDFILE(3)					       zziplib Function List					    ZZIP_ENTRY_FINDFILE(3)

NAME
zzip_entry_findfile, zzip_entry_findfirst, zzip_entry_findnext, zzip_entry_free, zzip_entry_findmatch - search for files in the (fseeko) zip central directory SYNOPSIS
#include <zzip/fseeko.h> zzip__new__ ZZIP_ENTRY * zzip_entry_findfile((FILE * disk, char *filename, ZZIP_ENTRY * _zzip_restrict entry, zzip_strcmp_fn_t compare)); zzip__new__ ZZIP_ENTRY * zzip_entry_findfirst((FILE * disk)); zzip__new__ ZZIP_ENTRY * zzip_entry_findnext((ZZIP_ENTRY * _zzip_restrict entry)); int zzip_entry_free((ZZIP_ENTRY * entry)); zzip__new__ ZZIP_ENTRY * zzip_entry_findmatch((FILE * disk, char *filespec, ZZIP_ENTRY * _zzip_restrict entry, zzip_fnmatch_fn_t compare, int flags)); DESCRIPTION
The zzip_entry_findfile function is given a filename as an additional argument, to find the disk_entry matching a given filename. The compare-function is usually strcmp or strcasecmp or perhaps strcoll, if null then strcmp is used. - use null as argument for "old"-entry when searching the first matching entry, otherwise the last returned value if you look for other entries with a special "compare" function (if null then a doubled search is rather useless with this variant of _findfile). If no further entry is found then null is returned and any "old"-entry gets already free()d. The zzip_entry_findfirst function is the first call of all the zip access functions here. It contains the code to find the first entry of the zip central directory. Here we require the stdio handle to represent a real zip file where the disk_trailer is _last_ in the file area, so that its position would be at a fixed offset from the end of the file area if not for the comment field allowed to be of variable length (which needs us to do a little search for the disk_tailer). However, in this simple implementation we disregard any disk_trailer info telling about multidisk archives, so we just return a pointer to the first entry in the zip central directory of that file. For an actual means, we are going to search backwards from the end of the mmaped block looking for the PK-magic signature of a disk_trailer. If we see one then we check the rootseek value to find the first disk_entry of the root central directory. If we find the correct PK-magic signature of a disk_entry over there then we assume we are done and we are going to return a pointer to that label. The return value is a pointer to the first zzip_disk_entry being checked to be within the bounds of the file area specified by the arguments. If no disk_trailer was found then null is returned, and likewise we only accept a disk_trailer with a seekvalue that points to a disk_entry and both parts have valid PK-magic parts. Beyond some sanity check we try to catch a common brokeness with zip archives that still allows us to find the start of the zip central directory. The zzip_entry_findnext function takes an existing "entry" in the central root directory (e.g. from zzip_entry_findfirst) and moves it to point to the next entry. On error it returns 0, otherwise the old entry. If no further match is found then null is returned and the entry already free()d. If you want to stop searching for matches before that case then please call zzip_entry_free on the cursor struct ZZIP_ENTRY. the zzip_entry_free function releases the malloc()ed areas needed for zzip_entry, the pointer is invalid afterwards. The zzip_entry_free function has #define synonyms of zzip_entry_findlast(), zzip_entry_findlastfile(), zzip_entry_findlastmatch() The zzip_entry_findmatch function uses a compare-function with an additional argument and it is called just like fnmatch(3) from POSIX.2 AD:1993), i.e. the argument filespec first and the ziplocal filename second with the integer-flags put in as third to the indirect call. If the platform has fnmatch available then null-compare will use that one and otherwise we fall back to mere strcmp, so if you need fnmatch searching then please provide an implementation somewhere else. - use null as argument for "after"-entry when searching the first matching entry, or the last disk_entry return-value to find the next entry matching the given filespec. If no further entry is found then null is returned and any "old"-entry gets already free()d. AUTHOR
o Guido Draheim <guidod@gmx.de> COPYRIGHT
Copyright (c) 2003,2004 Guido Draheim All rights reserved, use under the restrictions of the Lesser GNU General Public License or alternatively the restrictions of the Mozilla Public License 1.1 zziplib 0.13.62 ZZIP_ENTRY_FINDFILE(3)
All times are GMT -4. The time now is 04:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy