Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

fmt_str(3) [debian man page]

fmt_str(3)						     Library Functions Manual							fmt_str(3)

NAME
fmt_str - write an ASCII string SYNTAX
#include <fmt.h> size_t fmt_str(char *dest,const char *source); DESCRIPTION
fmt_str copies all leading nonzero bytes from source to dest and returns the number of bytes it copied. fmt_str does not append . If dest equals FMT_LEN (i.e. is zero), fmt_str returns the number of bytes it would have written, i.e. the number of leading nonzero bytes of source. SEE ALSO
strcpy(3) fmt_str(3)

Check Out this Related Man Page

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

NAME
strcpy, strncpy - copy a string SYNOPSIS
#include <string.h> char *strcpy(char *dest, const char *src); char *strncpy(char *dest, const char *src, size_t n); DESCRIPTION
The strcpy() function copies the string pointed to by src (including the terminating `' character) to the array pointed to by dest. The strings may not overlap, and the destination string dest must be large enough to receive the copy. The strncpy() function is similar, except that not more than n bytes of src are copied. Thus, if there is no null byte among the first n bytes of src, the result will not be null-terminated. In the case where the length of src is less than that of n, the remainder of dest will be padded with nulls. RETURN VALUE
The strcpy() and strncpy() functions return a pointer to the destination string dest. BUGS
If the destination string of a strcpy() is not large enough (that is, if the programmer was stupid/lazy, and failed to check the size before copying) then anything might happen. Overflowing fixed length strings is a favourite cracker technique. CONFORMING TO
SVID 3, POSIX, BSD 4.3, ISO 9899 SEE ALSO
bcopy(3), memccpy(3), memcpy(3), memmove(3) GNU
1993-04-11 STRCPY(3)
Man Page

5 More Discussions You Might Find Interesting

1. Programming

Passing printf formatting parameters as variables

Hi, I haven't programed in C in a few years. I have been doing a lot of shell scripting, I.E. not really programming anything heavy. :o That said, I have a script that gives hourly usage statistics for our email server. It runs w-a-y to slow as a script for my impatience, and needs to... (7 Replies)
Discussion started by: mph
7 Replies

2. Shell Programming and Scripting

Need Help with awk

Dear Community; I have the following file: 596688171,2,2014-05-27,,06:01:20+0300,,2,,, 582187651,2,2014-04-29,,04:27:28+0300,,2,,, 582187651,10,2014-06-11,2037-12-31,18:00:12+0300,23:59:59+0300,2,,, 598273217,10,2014-06-05,2037-12-31,10:33:17+0300,23:59:59+0300,2,,, ... (2 Replies)
Discussion started by: mystition
2 Replies

3. Shell Programming and Scripting

Unable to get the Specific column with 2 decimal place

Hi, I have an issue converting decimal places of a particular column, i am using below script to get the output, but the output is not generating in desired format. awk -F"," 'BEGIN{OFS=","}{if(NR==0)getline;if ($7 != "") {if ($7 > 0) $7=$7/100 ; {printf "%.2f"... (3 Replies)
Discussion started by: rramkrishnas
3 Replies

4. Shell Programming and Scripting

Need to print hash of hash in table format

Hi, I have a hash of hash where it has name, activities and count i have data like this - $result->{$name}->{$activities} = $value; content of that are - name - robert tom cat peter activities - running, eating, sleeping , drinking, work i need to print output as below ... (3 Replies)
Discussion started by: asak
3 Replies

5. Shell Programming and Scripting

Valid separator in time and date format

Hello. I can use any particular (stupid or not) format when using bash date command. Example : ~> date --date "now" '+%Y-%m-%d %H!%M!%S' 2019-06-03 12!55!33or ~> date --date "now" '+%Y£%m£%d %H¤%M¤%S' 2019£06£03 12¤57¤36 or ~> date --date "now" '+%Y-%m-%d %H-%M-%S' 2019-06-03 12-58-51 ... (4 Replies)
Discussion started by: jcdole
4 Replies