hi,
I get a *.dat files list in an array using:
array=($(find . -name "*.dat"))
the problem is that when a filename contains spaces, each space-separated token of the filename is in a different element of array.
For instance if I have:
x@x:~/tmp$ ls *.dat
test1.dat test 2.dat ... (1 Reply)
Newbie to bash here. I think this is fairly simple, but I have searched and cannot figure it out. In the code below, I am searching an array for an IP address, and then printing the IP address if found. However, I would like to print the actual variable found such as 2.2.2.2=2, but cannot figure... (1 Reply)
Hi
I am really new to awk and using shell script but I am wondering if its possible to find the sum of an array? I looked online but most of the things there are confusing, and when I tried it on my own it kept giving me the value of the last entry into the array for the sum.
I have an array... (2 Replies)
practicing perl now and hope to get uniq item from an array:
my current work:
#!/usr/local/bin/perl
my @source = ("aaa", "aaa", "bbb", "ccc", "ddd");
my $index=0;
my @uniq;
foreach (@source)
{
chomp;
# push first item to @uniq
if ($index == 0)
{
push @uniq, $_;
... (2 Replies)
Hi
I'm trying to write a shell script which finds all the .zip files in a given directory then lists them on the screen and prompts the user to select one by entering a number e.g.
The available files are:
1. HaveANiceDay.zip
2. LinuxHelp.zip
3. Arrays.zip
Please enter the... (4 Replies)
I need help parsing the output of find into an array. I need to search 3 directories and find all files older than 31 days old. This is what I have so far.
TIME=" -maxdepth 1 -mtime +31"
DIR1="/dir1/"
DIR2="/dir2/"
DIR3="/dir3/"
FIND_DIR1=$(find ${DIR1}${TIME})
FIND_DIR3=$(find... (8 Replies)
Does anyone know how to find length of multi dimension array
of following type
A Afor simple array I is to do
for (i in A)n++ to find length of array but if it is multi dimension how to find the length ? (2 Replies)
Hi all
I have a problem where i have a large list ( up to 1000 of items) and need to have 2 items pulled from it into variables in a bash script
my list is like the following and I could have it as an array or possibly an external text file maintained separately. Every line is different and... (6 Replies)
Hello,
I'm new here. I test these expressions's value in my script :
(in centOS 6 )
#!/bin/bash
array='something'
echo "############"
echo ${array}
echo ${array}
echo ${array}
echo "############"
The output result is :
#################
something
something
#################... (5 Replies)
Hello,
I have some tab delimited text data,
file: final_temp1
aname val
NAME;r'(1,) 3.28584
r'(2,)<tab>
NAME;r'(3,) 6.13003
NAME;r'(4,) 4.18037
r'(5,)<tab>
You can see that the data is incomplete in some cases. There is a trailing tab after the first column for each incomplete row. I... (2 Replies)
Discussion started by: LMHmedchem
2 Replies
LEARN ABOUT SUSE
punycode_encode
punycode_encode(3) libidn punycode_encode(3)NAME
punycode_encode - encode Unicode to Punycode
SYNOPSIS
#include <punycode.h>
int punycode_encode(size_t input_length, const punycode_uint [] input, const unsigned char [] case_flags, size_t * output_length, char []
output);
ARGUMENTS
size_t input_length
The number of code points in the input array and the number of flags in the case_flags array.
const punycode_uint [] input
An array of code points. They are presumed to be Unicode code points, but that is not strictly REQUIRED. The array contains
code points, not code units. UTF-16 uses code units D800 through DFFF to refer to code points 10000..10FFFF. The code points
D800..DFFF do not occur in any valid Unicode string. The code points that can occur in Unicode strings (0..D7FF and
E000..10FFFF) are also called Unicode scalar values.
const unsigned char [] case_flags
A NULL pointer or an array of boolean values parallel to the input array. Nonzero (true, flagged) suggests that the corre-
sponding Unicode character be forced to uppercase after being decoded (if possible), and zero (false, unflagged) suggests that
it be forced to lowercase (if possible). ASCII code points (0..7F) are encoded literally, except that ASCII letters are forced
to uppercase or lowercase according to the corresponding case flags. If case_flags is a NULL pointer then ASCII letters are
left as they are, and other code points are treated as unflagged.
size_t * output_length
The caller passes in the maximum number of ASCII code points that it can receive. On successful return it will contain the
number of ASCII code points actually output.
char [] output
An array of ASCII code points. It is *not* null-terminated; it will contain zeros if and only if the input contains zeros.
(Of course the caller can leave room for a terminator and add one if needed.)
DESCRIPTION
Converts a sequence of code points (presumed to be Unicode code points) to Punycode.
RETURN VALUE
The return value can be any of the Punycode_status values defined above except PUNYCODE_BAD_INPUT. If not PUNYCODE_SUCCESS, then out-
put_size and output might contain garbage.
REPORTING BUGS
Report bugs to <bug-libidn@gnu.org>. GNU Libidn home page: http://www.gnu.org/software/libidn/ General help using GNU software:
http://www.gnu.org/gethelp/
COPYRIGHT
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Simon Josefsson.
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
SEE ALSO
The full documentation for libidn is maintained as a Texinfo manual. If the info and libidn programs are properly installed at your site,
the command
info libidn
should give you access to the complete manual.
libidn 1.15 punycode_encode(3)