I am a beginner at shell scripting, actually i am working on my first script right now.
Anyway i have searched the world how to grep two letters from each word (it will always just be two words).
For example:
Example Blablabla
I want my script to cut out Ex (from the first word) and Bl... (4 Replies)
Hi
Is there a way to cut the last two characters off a word or number given that this word or number can be of varying length?
I have tried something like
TEST=`echo $OLD | cut -c 1-5`
where $OLD is a variable containing a number like 1234567 which gives a result of 12345. This is fine... (4 Replies)
Hi,
I have a question on bash. Basically I would like to print a file name using bash. I am actually trying to grep a particular character in sequential files.
I have alot files such that a.txt, b.txt,c.txt...etc.
If I found a certain character, I would print that particular filename.
I... (5 Replies)
I have been reading for a few hours trying to educate myself enough to accomplish this task, so please know I have performed some research. Unfortunately, I am not a *NIX scripting expert, or a coder. I come from a network background instead.
SO, here is my desired outcome. I have some Cisco... (5 Replies)
Hi,
From the file "example" with lines like below, I need the int value associated with ENG , i.e, 123
SUB: ENG123, GROUP 1
SUB: HIS124, GROUP 1
..
..
Normally , i do
grep ENG example | cut -d ' ' -f 2 | cut -c 4-6
Is it possible to do it in simpler way using awk/sed ?
... (5 Replies)
Hi,
On a daily basis I have download .zip file from FTP site. Naming convention of .zip is UCC-20100816.zip
I want to create windows batch file which will automatically download latest .zip file based on system date.
.zip file is gets uploaded on a daily basis on FTP site in... (4 Replies)
Hi,
I would greatly appreciate it if someone can help me with my problem.
I have a crawler which collects spam URLs everyday & this data needs to be published in a blacklist.
Here's the catch:
The "Time To Live" (TTL) for each URL is 3 months (or whatever for that matter). If i see the... (5 Replies)
Discussion started by: r4v3n
5 Replies
LEARN ABOUT CENTOS
zip_name_locate
ZIP_NAME_LOCATE(3) Library Functions Manual ZIP_NAME_LOCATE(3)NAME
zip_name_locate - get index of file by name
LIBRARY
libzip (-lzip)
SYNOPSIS
#include <zip.h>
int zip_name_locate(struct zip *archive, const char *fname, int flags);
DESCRIPTION
The zip_name_locate function returns the index of the file named fname in archive. If archive does not contain a file with that name, -1
is returned. The are specified by or'ing the following values, or 0 for none of them.
ZIP_FL_NOCASE Ignore case distinctions.
ZIP_FL_NODIR Ignore directory part of file name in archive.
RETURN VALUES
zip_name_locate returns the index of the file named fname or -1, if archive does not contain an entry of that name.
ERRORS
The zip_name_locate function fails and sets the error information to ZIP_ER_NOENT if no entry of the name fname is found in the archive.
If one of the arguments is invalid, the error information is set to ZIP_ER_INVAL.
SEE ALSO libzip(3), zip_get_name(3)AUTHORS
Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at>
NiH October 4, 2006 ZIP_NAME_LOCATE(3)