Sponsored Content
Top Forums UNIX for Dummies Questions & Answers 2 simple questions the linux pros will be able to get. Pleese help! Post 42445 by nregenwether on Wednesday 29th of October 2003 03:45:16 PM
Old 10-29-2003
I got it going. Thanks a lot. Youve been a big help. thanks again-nolan
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Simple grep questions

Hi all, My boss wants me to find out how often e-m users are accessing their account:confused:. The mail server keeps log of all logins. I want to use grep the 'usernames', but it should come out the moment it first encounters the username in the log. Can I do that? I want to avoid 10+ greps... (2 Replies)
Discussion started by: nitin
2 Replies

2. UNIX for Dummies Questions & Answers

Simple questions

hi, i am a total dummy of unix. i want to find out the following information from my Sun Solaris 8 Unix machine: 1) The command to display physical and virtual memory 2) The command to display the CPU 3) The command to display the total harddisk space. thank u very much and have a nice... (3 Replies)
Discussion started by: champion
3 Replies

3. UNIX for Dummies Questions & Answers

2 Simple Questions

Hi, I am a dummy in unix. I have 2 simple questions. 1) I am the adminstrator. I want to set a alias that applied to all the users. I do not want to update each user's .profile or .cshrc file. So is there a way to update it in one file so that it applies to all users ? Example : I want... (1 Reply)
Discussion started by: champion
1 Replies

4. UNIX for Dummies Questions & Answers

Simple ed questions - insert line with dot

Hi I've got a trivial question on using ed (yes, I know, other editors are better!) How do I insert a line that is just a single dot? (That is, how do I insert a line that starts with a dot and then new line) Thanks Peter (4 Replies)
Discussion started by: peterl
4 Replies

5. UNIX for Dummies Questions & Answers

Simple make file questions....i think, thnx

Hello, I'm a noob when comes to make files.... My intentions for the use of my make file are not that of a usual compilation, etc. It is simply to copy some files from a RCS controlled area to a public area which has read rights only for a web page. My dilemma comes in the form of sub... (0 Replies)
Discussion started by: Roxydogg28
0 Replies

6. Solaris

Two simple questions about Solaris DCHP and Samba

I have two simple questions First is :can dhcp server NATIVE of solaris perform dhcp updates of bind via dnssec like dchpd on linux? Second: Is possible to build a pdc with samba and iplanet ldap server?Or is better with openldap? I never found howto or discussions about iplanet server. Thanks (0 Replies)
Discussion started by: Linusolaradm1
0 Replies

7. AIX

Simple AWK cleanup/questions AIX

I have an unfortunate need to redo a bunch of disk settings on a VIOS on AIX, so I was putting together a quick script to scrub everything it has, make the changes, and then put the mappings back. It works, I just am trying to get my awk a bit more up-to-snuff and wanted to know the proper way to... (2 Replies)
Discussion started by: Vryali
2 Replies

8. AIX

Simple questions about LPARs

Hello, I am looking into virtualizing AIX 7.1 on our p7 machine that already has AIX 7.1 installed on it. I have a few questions about them: 1) In order to gain LPAR functionality, do I need to purchase PowerVM software? 2) I read that LPARs are managed from locally attached graphical... (1 Reply)
Discussion started by: bstring
1 Replies

9. UNIX for Beginners Questions & Answers

Simple sed command not working; could be a Mac/Linux vs. PC/Linux issue

Hello, I am on a Mac and trying to clean up some monthly files with a very simple SED: sed '3,10d;/<ACROSS>/,$d' input.txt > output.txt (from the input, delete lines 3 - 10; then delete from the line containing <ACROSS> to the end of the file) then output to output.txt Even when I try... (2 Replies)
Discussion started by: verbatim
2 Replies
STRSTR(3)						   BSD Library Functions Manual 						 STRSTR(3)

NAME
strstr, strcasestr, strnstr -- locate a substring in a string LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <string.h> char * strstr(const char *big, const char *little); char * strcasestr(const char *big, const char *little); char * strnstr(const char *big, const char *little, size_t len); #include <string.h> #include <xlocale.h> char * strcasestr_l(const char *big, const char *little, locale_t loc); DESCRIPTION
The strstr() function locates the first occurrence of the null-terminated string little in the null-terminated string big. The strcasestr() function is similar to strstr(), but ignores the case of both strings. The strcasestr_l() function does the same as strcasestr() but takes an explicit locale rather than using the current locale. The strnstr() function locates the first occurrence of the null-terminated string little in the string big, where not more than len charac- ters are searched. Characters that appear after a '' character are not searched. Since the strnstr() function is a FreeBSD specific API, it should only be used when portability is not a concern. RETURN VALUES
If little is an empty string, big is returned; if little occurs nowhere in big, NULL is returned; otherwise a pointer to the first character of the first occurrence of little is returned. EXAMPLES
The following sets the pointer ptr to the "Bar Baz" portion of largestring: const char *largestring = "Foo Bar Baz"; const char *smallstring = "Bar"; char *ptr; ptr = strstr(largestring, smallstring); The following sets the pointer ptr to NULL, because only the first 4 characters of largestring are searched: const char *largestring = "Foo Bar Baz"; const char *smallstring = "Bar"; char *ptr; ptr = strnstr(largestring, smallstring, 4); SEE ALSO
memchr(3), memmem(3), strchr(3), strcspn(3), strpbrk(3), strrchr(3), strsep(3), strspn(3), strtok(3), wcsstr(3) STANDARDS
The strstr() function conforms to ISO/IEC 9899:1990 (``ISO C90''). BSD
October 11, 2001 BSD
All times are GMT -4. The time now is 01:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy