Ok, I think I got this thing working now.
I did not know how to extract content A,B,C from "only" end brackets so I had to create new VAR from the tail brackets (if existed) and then extract contents of A,B and C from that. Otherwise regex would be getting 1,2,3 from brackets in the filename.
Anyway... it is ok as it is now but if there is a better solution I would love to learn it.
note: this is for string testing only, once it is in a real script I would have checking to see if file or directory before getting shortName and extension.
While I was reading a Sun SysAdmin Guide, I came across this point...
/etc/vfstab Field Descriptions
mount at boot -
The root (/), /usr and /var file systems are not mounted from the vfstab file initially.
This field should always be set to no for these file systems and for virtual file... (2 Replies)
Hi
I want to do a regex test and branch based on the test result, but this doesn't seems to work :confused:
if \) ]]
then
echo success
else
echo failed
fi (1 Reply)
Hello everybody,
I'm clearly not an expert in bash scripting as I've written maybe less than 10 scripts in my life. I'm trying to strip an xml string removing every tag in it. I'm using bash substitution to do so, but apparently I missed something about what is a regex for bash ...
As an... (4 Replies)
Hey all,
I have a very simple regular expression that I use when I want to allow only letters with spaces. (I know this regex has a lot of shortcomings, but I'm still trying to learn them)
isAlpha='^*$'However, when I bring this over to BASH it doesn't allow me to enter spaces.
I use the... (3 Replies)
I've been using the following regex below in a bash script on RHEL 5.5 using version
GNU bash, version 3.2.25(1)-release
I've tried using the script on RHEL 6.3 which uses GNU bash, version 4.1.2(1)-release
I assume there's been alot of changes to bash since that's quite a jump in revisions.... (12 Replies)
Hi, I am trying to match this word: hexagon-bx.mydomain.com with regex. I have tried this:
"\.*]*$"
So far I have not been successful. I also need to make sure that the regex will match words that just have lowercase letters and numbers in them, such as camera01. How can I create such an... (5 Replies)
I want to print the filename
keyword="XXTNL_AVSKRIV2ING"
ftype="sql'
I wan to search the keyword in all the sql files and the output shoul dbe filename:count
grep -iwc "$keyword" *.$ftype | grep -v ":0$"
But the output does not dispaly the filename which contains space as... (4 Replies)
Dear master Unix.com,
I ask about command,
what is command the meaning this?
and what the function?
/usr/lpp/diagnostics/bin/usysfault -s normal
regards,
-Ruhul (3 Replies)
I am trying to find files using the following by using simple bash script:
if -2014 ]]; then echo "yes";fi
What I need to find are any files with date 08-**-2014 so August 2014 any files.
I can use if -2014 ]]; then echo "yes";fi
That works fine. How do I get files beginning with 08... (1 Reply)
I stumbled upon a problem, which I simplified to this:
There is a list of numbers, stored in variable $LIST, lets use `seq 5 25` for demonstration.
There is a number that should be compared against this list. For demonstration I use user input - read VALUE
I am trying to compare RegEx... (2 Replies)
Discussion started by: Zorbeg
2 Replies
LEARN ABOUT DEBIAN
zzip_open_ext_io
ZZIP_OPEN(3) zziplib Function List ZZIP_OPEN(3)NAME
zzip_open, zzip_open_ext_io, zzip_open_shared_io - ...
SYNOPSIS
#include <zzip/lib.h>
ZZIP_FILE * zzip_open((zzip_char_t * filename, int o_flags));
ZZIP_FILE * zzip_open_ext_io((zzip_char_t * filename, int o_flags, int o_modes, zzip_strings_t * ext,
zzip_plugin_io_t io));
ZZIP_FILE * zzip_open_shared_io((ZZIP_FILE * stream, zzip_char_t * filename, int o_flags,
int o_modes, zzip_strings_t * ext, zzip_plugin_io_t io));
DESCRIPTION
The zzip_open_ext_io function uses explicit ext and io instead of the internal defaults, setting them to zero is equivalent to zzip_open
note that the two flag types have been split into an o_flags (for fcntl-like openflags) and o_modes where the latter shall carry the
zzip_flags and possibly accessmodes for unix filesystems. Since this version of zziplib can not write zipfiles, it is not yet used for
anything else than zzip-specific modeflags.
The zzip_open_ext_io function returns a new zzip-handle (use zzip_close to return it). On error the zzip_open_ext_io function will return
null setting errno(3).
The zzip_open_shared_io function takes an extra stream argument - if a handle has been then ext/io can be left null and the new stream
handle will pick up the ext/io. This should be used only in specific environment however since zzip_file_real does not store any
ext-sequence.
The benefit for the zzip_open_shared_io function comes in when the old file handle was openened from a file within a zip archive. When the
new file is in the same zip archive then the internal zzip_dir structures will be shared. It is even quicker, as no check needs to be done
anymore trying to guess the zip archive place in the filesystem, here we just check whether the zip archive's filepath is a prefix part of
the filename to be opened.
Note that the zzip_open_shared_io function is also used by zzip_freopen that will unshare the old handle, thereby possibly closing the
handle.
The zzip_open_shared_io function returns a new zzip-handle (use zzip_close to return it). On error the zzip_open_shared_io function will
return null setting errno(3).
AUTHOR
o Guido Draheim <guidod@gmx.de> Tomi Ollila <Tomi.Ollila@iki.fi>
COPYRIGHT
Copyright (c) 1999,2000,2001,2002,2003 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_OPEN(3)