05-18-2005
Quote:
man scanf
...
...
scanf() cannot read a null string.
...
I think that this is where your problem lies. You can replace the scanf with the fgets that I am using in the code that I have posted in this thread.
9 More Discussions You Might Find Interesting
1. What is on Your Mind?
i'm trying to learn unix and i posted a question and what i was typing from school. i can't figure it out. how am i supposed to learn , when i get shutdown by an admin. for posting a homework question. doesn't make any sense. its a dumb rule. thanks for helping (4 Replies)
Discussion started by: AtomJ22
4 Replies
2. Shell Programming and Scripting
I have a string which contains following information:
<SZ.T><P ALIGN="CENTER"><FONT FACE="Arial, Helvetica, sans-serif" SIZE="+3">Bundesregierung nimmt sich dicke Deutsche vor</FONT></P></SZ.T>
<SZ.UT><P ALIGN="CENTER"><FONT SIZE="+1"><I> Seehofer und Schmidt planen Kampagne gegen... (3 Replies)
Discussion started by: trek
3 Replies
3. UNIX for Dummies Questions & Answers
I have concurrent manager stop and check to verify all the process are stopped BUT even after all the process are stopped query script continues to run without break out.
# stop the concurrent manager
$COMMON_TOP/admin/scripts/$CONTEXT_NAME/adstpall.sh $DB_USER/$DB_PSWD
# check if the... (1 Reply)
Discussion started by: Paul.S
1 Replies
4. Shell Programming and Scripting
Hi I posted earlier. This is sorta similar but I want to delete rows that dont have R, T, Y or U.
Nam1 RTYU
Nam2 RRTT
Nam3 RYTU
Nam4 IRTT
So the output would look like this?
Nam1 RTYU
Nam2 RRTT
Nam3 RYTU
too many problems
thanks (3 Replies)
Discussion started by: kylle345
3 Replies
5. Shell Programming and Scripting
I am new to unix and have come across the sed expression but not sure what its doing. Can someone please tell me whats happening in the sed command below? (2 Replies)
Discussion started by: 5211171
2 Replies
6. Shell Programming and Scripting
Dear users,
I googled for a while, but i have got a lot of different answers regarding a simple unix command.
lets say there are a lot of files in a directory.
How can i list the files in a directory whose file types is "text"?
Thank you in advance (4 Replies)
Discussion started by: kevincobain2000
4 Replies
7. Shell Programming and Scripting
okthanksi solve it :) (1 Reply)
Discussion started by: dream23
1 Replies
8. UNIX for Dummies Questions & Answers
can while do make aloop as do while in c language ? (1 Reply)
Discussion started by: teefa
1 Replies
9. Ubuntu
Hello,
I wrote a script and disabled Ctrl+C using
trap ' ' 2
For security, I cannot allow users to exit the script on their own for then they would have access to the command prompt. Are there any other cases that I need to cover?
Thank you. I'm new to scripting. (6 Replies)
Discussion started by: fzivkovi
6 Replies
LEARN ABOUT SUNOS
mvscanw
mvscanw(3XCURSES) X/Open Curses Library Functions mvscanw(3XCURSES)
NAME
mvscanw, mvwscanw, scanw, wscanw - convert formatted input from a window
SYNOPSIS
cc [ flag... ] file... -I /usr/xpg4/include -L /usr/xpg4/lib
-R /usr/xpg4/lib -lcurses [ library... ]
c89 [ flag... ] file... -lcurses [ library... ]
#include <curses.h>
int mvscanw(int y, int x, char *fmt, ...);
int mvwscanw(WINDOW *win, int y, int x, char *fmt, ...);
int scanw(char *fmt, ...);
int wscanw(WINDOW *win, char *fmt, ...);
PARAMETERS
y Is the y (row) coordinate of the position of the character to be read.
x Is the x (column) coordinate of the position of the character to be read.
fmt Is a scanf() format string.
win Is a pointer to the window in which the character is to be read.
DESCRIPTION
These functions are similar to scanf(3C). Their effect is as though mvwgetstr(3XCURSES) were called to get a multi-byte character string
from the current or specified window at the current or specified cursor position, and then sscanf() were used to interpret and convert that
string.
RETURN VALUES
Upon successful completion, these functions return OK. Otherwise, they return ERR.
ERRORS
No errors are defined.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |Unsafe |
+-----------------------------+-----------------------------+
SEE ALSO
getnstr(3XCURSES), libcurses(3XCURSES), printw(3XCURSES), scanf(3C), wcstombs(3C), attributes(5), standards(5)
SunOS 5.10 5 Jun 2002 mvscanw(3XCURSES)