10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
2. UNIX for Beginners Questions & Answers
Hi All,
I have 2 pipe delimited files viz., file_old and file_new. I'm trying to compare these 2 files, and extract all the different rows between them into a new_file.
comm -3 < sort file_old < sort file_new > new_file
I am getting the below error:
-ksh: sort: cannot open
But if I do... (7 Replies)
Discussion started by: njny
7 Replies
3. Red Hat
We are having issues with our Postfix. The POP and IMAP services randomly stops working an sent e-mails return a "Command time limit exceeded".
We've found out that running these command fix the problem:
service cyrus-imapd stop
rm /var/lib/imap/tls_sessions.db*
rm... (2 Replies)
Discussion started by: GustavoAlvarado
2 Replies
4. UNIX for Dummies Questions & Answers
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
5. UNIX for Dummies Questions & Answers
I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this:
$ look "string" "/home/patrick/filename.txt"
However, this gives me the following message:
"look: /home/patrick/filename.txt: File too large"
So, I have two... (14 Replies)
Discussion started by: shishong
14 Replies
6. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
7. Shell Programming and Scripting
Hi!!..
I would like to know what is maximum character size for a command in the "sh" or "bourne" shell?
Thanks in advance..
Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies
8. UNIX for Advanced & Expert Users
Hi!!..
I would like to know what is maximum character size for a command in the "sh" or "bourne" shell?
Thanks in advance..
Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies
9. UNIX for Dummies Questions & Answers
Hi!!..
I would like to know what is maximum character size for a command in the "sh" or "bourne" shell?
Thanks in advance..
Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies
10. Shell Programming and Scripting
With respect to my other query I was trying to compare the data in files with "comm" command.
File -1: (InCU_notDB)
EP120307602281841
EP120607602631482
EP120607602631483
EP120607602631484
EP120607602631485
EP120607602631486
EP120607602631487
EP092905800544601
EP071708601490636... (4 Replies)
Discussion started by: swame_sp
4 Replies
ZZIP_DISK_FINDFILE(3) zziplib Function List ZZIP_DISK_FINDFILE(3)
NAME
zzip_disk_findfile, zzip_disk_findfirst, zzip_disk_findnext, zzip_disk_findmatch - search for files in the (mmapped) zip central directory
SYNOPSIS
#include <zzip/mmapped.h>
struct zzip_disk_entry * zzip_disk_findfile(( ZZIP_DISK * disk, char *filename, struct zzip_disk_entry
*after, zzip_strcmp_fn_t compare));
struct zzip_disk_entry * zzip_disk_findfirst((ZZIP_DISK * disk));
struct zzip_disk_entry * zzip_disk_findnext(( ZZIP_DISK * disk, struct zzip_disk_entry *entry));
struct zzip_disk_entry * zzip_disk_findmatch(( ZZIP_DISK * disk, char *filespec, struct zzip_disk_entry *after,
zzip_fnmatch_fn_t compare, int flags));
DESCRIPTION
The zzip_disk_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 "after"-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).
The zzip_disk_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 mmapped block 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 zip central directory.
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_disk_findnext function takes an existing disk_entry in the central root directory (e.g. from zzip_disk_findfirst) and returns the
next entry within in the given bounds of the mmapped file area.
The zzip_disk_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.
AUTHOR
o Guido Draheim <guidod@gmx.de>
COPYRIGHT
Copyright (c) 2003,2004,2006 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.56 ZZIP_DISK_FINDFILE(3)