How to write a program to
store the list of ordinary files and the directory files in the specified directory in two files called dir.dat and ord.dat. Then print the largest directory and largest file? (1 Reply)
I have a java program to validate a XML file. I want to call this java program in a shell script which will be registered as concurrent program in oracle apps.
Can anyone please let me know the step by step appraoch required to call java program in shell script like ....intial steps... (1 Reply)
I'm trying to read a bunch of log files and output the lines that contain particular strings.
To accomplish this, I've been running the following from the command line:
find . -name "*" | xargs grep " " | grep " " > output.txt
Two grep statements are needed in case I'm looking for a... (3 Replies)
Hi,
We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Hi, guys:
I am working on my own shell using c. When I fork a child process and make it run in background. I hope when this process exits, my shell can print a line such as "this process exits". Does anyone know how to implement it?
Thanks (5 Replies)
I need a shell programing script for "double words"
Available Data:
This is a shell script that is used to find the ten character words in the machine local
dictionary (/usr/dict/words) that are made up with two valid english words that are
five character long. This means that each of the... (0 Replies)
Dear Unix gurus,
We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Dear Unix gurus,
We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Hi,
I'm facing issues while trying to run a sample program on Linux.
If I try to run the script using the command "sh <filename.prog>", it doesn't work. But, if I try to execute it using the command "ksh <filename.prog>", it works fine.
Even ". ./filename.prog" works fine.
Can you... (6 Replies)
Discussion started by: venkatesh17
6 Replies
LEARN ABOUT OSF1
index
strchr(3) Library Functions Manual strchr(3)NAME
index, rindex, strchr, strrchr - Search for character in string
LIBRARY
Standard C Library (libc.so, libc.a)
SYNOPSIS
#include <strings.h>
char *index(
const char *s,
int c);
char *rindex(
const char *s,
int c);
#include <string.h>
char *strchr(
const char *s,
int c);
char *strrchr(
const char *s,
int c);
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
index(), rindex(): XPG4-UNIX
strchr(), strrchr(): XPG4, XPG4-UNIX
Refer to the standards(5) reference page for more information about industry standards and associated tags.
PARAMETERS
Specifies the string to search. Specifies a character, expressed as an int data type, to search for.
DESCRIPTION
The index() function locates the first occurrence of the integer specified by the c parameter, which is converted to an unsigned char, in
the string pointed to by the s parameter. The terminating null byte is treated as part of the string pointed to by the s parameter.
The rindex() function locates the last occurrence of the integer specified by the c parameter, which is converted to a char value, in the
string pointed to by the s parameter. The terminating null byte is treated as a part of the string pointed to by the s parameter.
The strchr() and strrchr() functions provide the same functionality as the index() and rindex() functions, respectively.
If c is a null byte ('