07-23-2009
Thanks Malcom and Bubba,
the sed command worked.
Bubba, I tried your suggestion but it did not work. Perhaps because I am using bash instead of Korn or C shell ?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Everybody,
I need some help on formatting the files coming into unix box on the fly.
I get a file some thing like this in a single line.
ISA^M00^M ^M00^M ^M14^M006929681900 ^M01^M095449419 ... (5 Replies)
Discussion started by: ntekupal
5 Replies
2. Shell Programming and Scripting
hello i need some help here are the contents of my file.
test.txt
this is filename 1.mp3 http://www.url.com/filenamehashed
filename 2.mp3 http://www.url.com/fileamehashed
something_else.zip http://www.url.com/filenamehashed
so this file has 100 of these lines
filename url
I would... (9 Replies)
Discussion started by: mscice
9 Replies
3. UNIX for Dummies Questions & Answers
There is file named .htaccess. It is located in many directories on my web server. Instead of manually editing each file to add specific text, i thought there is possibly a command which will allow me to do that.
What i need to be done exactly?
In all .htaccess files i need to add/append the... (2 Replies)
Discussion started by: Boris_yo
2 Replies
4. Shell Programming and Scripting
Hi,
I have the following text file:
8 T1mapping_flip02 ok 128 108 30 1 665000-000008-000001.dcm
9 T1mapping_flip05 ok 128 108 30 1 665000-000009-000001.dcm
10 T1mapping_flip10 ok 128 108 30 1 665000-000010-000001.dcm
11 T1mapping_flip15 ok 128 108 30... (2 Replies)
Discussion started by: goodbenito
2 Replies
5. Shell Programming and Scripting
Hi All,
Just need small help in resolving the special new line character in generated output file.
In one of my shell script I am using following lines to get the spool file (i.e. sfile.txt) and
AAA_XXXX_p111_n222.txt
AAA_YYYY_p111_n222.txt
Here assuming
v_pnum="p111"
v_nid="n222"
... (1 Reply)
Discussion started by: shekharjchandra
1 Replies
6. UNIX for Dummies Questions & Answers
Good day ...
Well i do have this project in school, in our Principles Of Operating System Class
We are using Cygwin....
And our project goes like this...
Create a dictionary using cygwin. Display the following menu at the start of
execution
1-add a word in the dictionary # specify... (1 Reply)
Discussion started by: kpopfreakghecky
1 Replies
7. Shell Programming and Scripting
Good day ...
Well i do have this project in school, in our Principles Of Operating System Class
We are using Cygwin....
And our project goes like this...
Create a dictionary using cygwin. Display the following menu at the start of execution
1-add a word in the dictionary # specify the... (1 Reply)
Discussion started by: kpopfreakghecky
1 Replies
8. UNIX for Dummies Questions & Answers
Hello All,
this is my first post so I don't know if I am doing this right.
I would like to append entries from a series of strings (contained in a text file) consecutively at the end of specifically labeled lines in another file.
As an example:
- the file that contains the values to be... (3 Replies)
Discussion started by: gus74
3 Replies
9. Shell Programming and Scripting
Hi
This is my first post and I'm just a beginner. So please be nice to me.
I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file?
I have tried sed -n 241,241p... (13 Replies)
Discussion started by: dejavo
13 Replies
10. Shell Programming and Scripting
What is the proper syntax to add specific text to a column in a file? Both the input and output below are tab-delineated. What if there are multiple text/fields, such as /CP&/2 /CM&/3 /AA&/4 Thank you :).
sed 's/*/Index&/1' del.txt.hg19_multianno.txt > matrix.del.txt (4 Replies)
Discussion started by: cmccabe
4 Replies
LEARN ABOUT NETBSD
fgetwln
FGETWLN(3) BSD Library Functions Manual FGETWLN(3)
NAME
fgetwln -- get a line of wide characters from a stream
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <stdio.h>
#include <wchar.h>
wchar_t *
fgetwln(FILE * restrict stream, size_t * restrict len);
DESCRIPTION
The fgetwln() function returns a pointer to the next line from the stream referenced by stream. This line is not a standard wide-character
string as it does not end with a terminating null wide character. The length of the line, including the final newline, is stored in the mem-
ory location to which len points. (Note, however, that if the line is the last in a file that does not end in a newline, the returned text
will not contain a newline.)
RETURN VALUES
Upon successful completion a pointer is returned; this pointer becomes invalid after the next I/O operation on stream (whether successful or
not) or as soon as the stream is closed. Otherwise, NULL is returned. The fgetwln() function does not distinguish between end-of-file and
error; the routines feof(3) and ferror(3) must be used to determine which occurred. If an error occurs, the global variable errno is set to
indicate the error. The end-of-file condition is remembered, even on a terminal, and all subsequent attempts to read will return NULL until
the condition is cleared with clearerr(3).
The text to which the returned pointer points may be modified, provided that no changes are made beyond the returned size. These changes are
lost as soon as the pointer becomes invalid.
ERRORS
[EBADF] The argument stream is not a stream open for reading.
The fgetwln() function may also fail and set errno for any of the errors specified for the routines mbrtowc(3), realloc(3), or read(2).
SEE ALSO
ferror(3), fgetln(3), fgetws(3), fopen(3)
BSD
July 16, 2004 BSD