Hi,
One of our application is producing log files. But if we open the log file in vi or less or view mode, it shows all the special characters in it. The 'cat' shows correctly but it shows only last page. If I do 'cat' <file_name> | more, then again it shows special characters.
... (1 Reply)
Hi,
I need some advise on treating non printable chars over ascii value 126
Case 1 :
On some fields in the text , I need to retiain then 'as-is' and load to a database.I understand it also depends on database codepage.
but i just wanna know how do i ensure it do not change while loading... (1 Reply)
here is my simple script to show process and owners except me:
ps `-ef |grep xterm |grep -v aucar` | while read a1 a2 a3 a4 a5 a6 a7 a8
do
echo KILL..\($a1\).. $a2 |more
done
how can I pass values from command "ps -ef |grep xterm|grep -v aucar" to ?
because above command... (2 Replies)
Hi,
For years ive been using this script to do mass search & replaces on our websites. Its worked with all sorts of spaces, quotes, html or whatever with a little adjusting here and there. But I just cant get this pattern to work:
#!/bin/bash
OLDURL="document.write('<script... (2 Replies)
I was trying to run a code to check if a fax number is empty or not.
for that, I've written the following code which is throwing an error.
#!/bin/ksh
fax= "999-999-9999"
if ; then
fax_no="000-000-0000"
else
fax_no=$fax
fi
echo $fax_no
And I get the... (7 Replies)
Hi,
We are receiving an XML file in Unix which has some special characters between tags like '^' etc
<Tag> 1e^O7f%<2304e.$d8f57e8^Bf-&e.^Zh7/327e^O7 </Tag>
We need to remove all special characters like ^ ones and also any '&' or '<' or '>' being sent within the start and close tags i.e.... (6 Replies)
Hi, I'm having trouble with awk print all characters between 2 patterns. I tried more then one solution found on this forum but with no success.
Probably my mistakes are due to the special characters "" and "]"in the search patterns.
Well, have a log file like this:
logfile.txt
... (3 Replies)
I have a file with multiple lines. From each line I want to get all strings that starts with '+' and ends with '/'. Then I want the strings to be separated by ' + '
Example input:
+$A$/NOUN+At/NSUFF_FEM_PL+K/CASE_INDEF_ACC
Sample output:
$A$ + At + K (20 Replies)
Hi,
I have file
#cat drivers.txt
fcs0
fcs1
vscsi1
vscsi2
In this i need to check the availabality of "fcs" or "vscsi" alone not vscsi0,fcs1
I tried with "if condition" but it is not working.
cat drivers.txt| while read ADAP
do
echo "Checking for $ADAP"
if ;then
echo "FC... (9 Replies)
Hi Team,
I have a file a1.txt with data as follows.
dfjakjf...asdfkasj</EnableQuotedIDs><SQL><SelectStatement modified='1' type='string'><!
The delimiter string: <SelectStatement modified='1' type='string'><!
dlm="<SelectStatement modified='1' type='string'><!
The above command is... (7 Replies)
Discussion started by: kmanivan82
7 Replies
LEARN ABOUT SUNOS
index
index(3C) Standard C Library Functions index(3C)NAME
index, rindex - string operations
SYNOPSIS
#include <strings.h>
char *index(const char *s, int c);
char *rindex(const char *s, int c);
DESCRIPTION
The index() and rindex() functions operate on null-terminated strings.
The index() function returns a pointer to the first occurrence of character c in string s.
The rindex() function returns a pointer to the last occurrence of character c in string s.
Both index() and rindex() return a null pointer if c does not occur in the string. The null character terminating a string is considered
to be part of the string.
USAGE
On most modern computer systems, you can not use a null pointer to indicate a null string. A null pointer is an error and results in an
abort of the program. If you wish to indicate a null string, you must use a pointer that points to an explicit null string. On some
machines and with some implementations of the C programming language, a null pointer, if dereferenced, would yield a null string. Though
often used, this practice is not always portable. Programmers using a null pointer to represent an empty string should be aware of this
portability issue. Even on machines where dereferencing a null pointer does not cause an abort of the program, it does not necessarily
yield a null string.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO bstring(3C), malloc(3C), string(3C), attributes(5), standards(5)SunOS 5.10 24 Jul 2002 index(3C)