Hi,
I am trying to redefine the value of a variable based on another variable value. And I want to read in my variables from a enviroment file in the end -- at least I think so. But 1st here's what I want I need to get working:
var_1="11 10 9 8 7 6 5 4 3 2 1"
var_2=3
var_3=4
So I want... (12 Replies)
Can anyone tell me what is the purpose of a substitute variable in the unix programming language and give an example where it may be used?
Thanks! (0 Replies)
well I found lot of topics about awk..about if command in awk..
but I had to implement this:
nawk -F"|" '
$47 ~ /0R0011/ { print > ("/home/user/M/MC.tmp" )}
$47 ~ /0R0012/ { print > ("/home/user/M/DuSI.tmp" )}
$47 ~ /0R0014/ { print > ("/home/user/M/FF.tmp" )}
$47 ~ /0R0018/ { print >... (9 Replies)
Hi Gurus
I have a file called /tmp/CMDB which looks like this
serial: 0623AN1208
hostname: server1
model: x4100
assetID: 1234
I am writing a for loop that will go through this file line by line creating a variable of itself. Using the first iteration of the loop (i.e. the first line) as... (6 Replies)
hi all,
how do i assign values passed in from command line to and sql statement in perl ?? e.g
i want to assign :name1 and :Name2 to be whatever is passed into the perl script command line
my $sqlStr = "select * from test_table where column1 = upper(nvl(:name1, name1 )) and column2... (1 Reply)
hi all,
Assume that i a having the following three lines in an executable file
#/bin/bash
a=Tue
Tue=1
When i give echo $a the value should be 1, how to do this. Your suggestions please.
Thanks in advance,
Anish (4 Replies)
Hi friends,
I have small query with reg to awk search pattern..
below is my sample file and code which i tried..
$ cat file.txt
xxx,yyyyy,messageID,sha
xxxx,errorcode,messageID,name
in the above sample file - let assume I know the errorcode(2nd record) using which I want to... (2 Replies)
dear,
I have below file called folderlist.txt
# ParentFolder environment_flag SubFolders
triss 1 checksum
bookstructure 1
fx 1 checksum_GMDB
I have a script which which will create the folders under... (3 Replies)
Hi,
Here is my command
print $2 was meant to select the second column however, it is getting substituted with the second argument that was passed to the script.
Can you please tell me how can I resolve this ? (6 Replies)
Discussion started by: mohtashims
6 Replies
LEARN ABOUT DEBIAN
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)