Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

wcsdup(3) [suse man page]

WCSDUP(3)						     Linux Programmer's Manual							 WCSDUP(3)

NAME
wcsdup - duplicate a wide-character string SYNOPSIS
#define _GNU_SOURCE #include <wchar.h> wchar_t *wcsdup(const wchar_t *s); DESCRIPTION
The wcsdup() function is the wide-character equivalent of the strdup(3) function. It allocates and returns a new wide-character string whose initial contents is a duplicate of the wide-character string pointed to by s. Memory for the new wide-character string is obtained with malloc(3), and should be freed with free(3). RETURN VALUE
The wcsdup() function returns a pointer to the new wide-character string, or NULL if sufficient memory was not available. ERRORS
ENOMEM Insufficient memory available to allocate duplicate string. CONFORMING TO
POSIX.1-2008. This function is not specified in POSIX.1-2001, and is not widely available on other systems. SEE ALSO
strdup(3), wcscpy(3), feature_test_macros(7) COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. GNU
2009-02-04 WCSDUP(3)

Check Out this Related Man Page

WCSDUP(3)						     Linux Programmer's Manual							 WCSDUP(3)

NAME
wcsdup - duplicate a wide-character string SYNOPSIS
#include <wchar.h> wchar_t *wcsdup(const wchar_t *s); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): wcsdup(): Since glibc 2.10: _POSIX_C_SOURCE >= 200809L Before glibc 2.10: _GNU_SOURCE DESCRIPTION
The wcsdup() function is the wide-character equivalent of the strdup(3) function. It allocates and returns a new wide-character string whose initial contents is a duplicate of the wide-character string pointed to by s. Memory for the new wide-character string is obtained with malloc(3), and should be freed with free(3). RETURN VALUE
On success, wcsdup() returns a pointer to the new wide-character string. On error, it returns NULL, with errno set to indicate the cause of the error. ERRORS
ENOMEM Insufficient memory available to allocate duplicate string. ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7). +----------+---------------+---------+ |Interface | Attribute | Value | +----------+---------------+---------+ |wcsdup() | Thread safety | MT-Safe | +----------+---------------+---------+ CONFORMING TO
POSIX.1-2008. This function is not specified in POSIX.1-2001, and is not widely available on other systems. SEE ALSO
strdup(3), wcscpy(3) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. GNU
2017-09-15 WCSDUP(3)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Disc Copy

Is there a disk copy utiliy for unix systems eg: I need to make a duplicate copy of a netraT1 to a netraT1 Thanks (1 Reply)
Discussion started by: SmartJuniorUnix
1 Replies

2. Programming

How to make static unicode string?

In Windows, wchar_t *pStr = L"Hello"; works, but I can't find the equivalent to Unix system. How can I make static stack-memory-based wide character string in C in Unix? (1 Reply)
Discussion started by: sledge76
1 Replies

3. UNIX for Dummies Questions & Answers

duplicate emails

Hi all new here. Question. My mail server is sending out duplicate emails but its not system wide. We have several virtual host that use our email server and some are having the duplicate emails issue and some are not. For example in the office some people are getting duplicate emails but i am... (1 Reply)
Discussion started by: mcraul
1 Replies

4. Shell Programming and Scripting

Remove duplicate files based on text string?

Hi I have been struggling with a script for removing duplicate messages from a shared mailbox. I would like to search for duplicate messages based on the “Message-ID” string within the messages files. I have managed to find the duplicate “Message-ID” strings and (if I would like) delete... (1 Reply)
Discussion started by: spangberg
1 Replies

5. Shell Programming and Scripting

check duplicate elements

hi if i have arry with lots of intergers , how to check if there is duplicate integers in perl ? say I ahve @intergers=( 1,2,3,3,4,5,4,99,99,100) (2 Replies)
Discussion started by: james94538
2 Replies

6. UNIX for Dummies Questions & Answers

Duplicates

Hi, How to eliminate the duplicate values in unix? I have a excel file which contains duplicate values. Need to use this in a script. Thanks in advance. (3 Replies)
Discussion started by: venkatesht
3 Replies

7. UNIX for Dummies Questions & Answers

how to add duplicate lines

Hi, I have a file that looks like this: a_X data a_Y data b data c data d_X data d_Y data I **want** to duplicate the lines without the _X and _Ys. In other words, I want it to look like this a_X data a_Y data b data b data c data c data d_X data d_Y data (13 Replies)
Discussion started by: mikey11415
13 Replies

8. UNIX for Dummies Questions & Answers

dc (desk calculator) emulation project

Hey guys, I'm working on a project where we have to duplicate the 'dc' command. I'm having trouble figuring out how to queue the different commands available (such as printing stack contents or saving/executing macros and registers). I'm also having a great deal of trouble finding any literature... (1 Reply)
Discussion started by: wolfe.zach
1 Replies

9. Shell Programming and Scripting

Remove duplicate lines from a 50 MB file size

hi, Please help me to write a command to delete duplicate lines from a file. And the size of file is 50 MB. How to remove duplicate lins from such a big file. (6 Replies)
Discussion started by: vsachan
6 Replies

10. Shell Programming and Scripting

Find duplicate based on 'n' fields and mark the duplicate as 'D'

Hi, In a file, I have to mark duplicate records as 'D' and the latest record alone as 'C'. In the below file, I have to identify if duplicate records are there or not based on Man_ID, Man_DT, Ship_ID and I have to mark the record with latest Ship_DT as "C" and other as "D" (I have to create... (7 Replies)
Discussion started by: machomaddy
7 Replies

11. Shell Programming and Scripting

Search duplicate field and replace one of them with new value

Dear All, I have file with 4 columns: 1 AA 0 21 2 BB 0 31 3 AA 0 21 4 CC 0 41 I would like to find the duplicate record based on column 2 and replace the 4th column of the duplicate by a new value. So, the output will be: 1 AA 0 21 2 BB 0 31 3 AA 0 -21 4 CC 0 41 Any suggestions... (3 Replies)
Discussion started by: ezhil01
3 Replies

12. Shell Programming and Scripting

How to find duplicate line in Linux?

Hi, Gurus, I need find the duplicate record in unix file. what command I should use for this. Thanks in advance (4 Replies)
Discussion started by: ken6503
4 Replies

13. UNIX for Advanced & Expert Users

Find duplicate words using sed

I have following statement and I want to find duplicate word using sed command. How is it possible? "detect string and remove the duplicate string" There could be many statements in a file and each line may have duplicate word. Thanks! (1 Reply)
Discussion started by: jnrohit2k
1 Replies

14. Shell Programming and Scripting

Remove duplicate values with condition

Hi Gents, Please can you help me to get the desired output . In the first column I have some duplicate records, The condition is that all need to reject the duplicate record keeping the last occurrence. But the condition is. If the last occurrence is equal to value 14 or 98 in column 3 and... (2 Replies)
Discussion started by: jiam912
2 Replies

15. UNIX for Beginners Questions & Answers

Remove duplicate email

cat path/to/dir/file.html | grep -i 'x*.com' > path/to/dir/file.txt Before xyz.com xyz.com After cat path/to/dir/file.html | grep -i 'x*.com' | sed '$!s/$/,/' | tr -d '\n'> path/to/dir/file.txt Result --> Preferred output: xyz.com, xyz.com The preferred is the exact output I... (9 Replies)
Discussion started by: lpoolfc
9 Replies