Hi,
I have just written a script in /bin/bash, however, l want to test if character is a carriage return or space. Also l want my script to be able to detect my disk space and send a mail if usage is more than 90% or send an alert.
Thanks
Kayode (6 Replies)
I am doing some edi where translations had to be run on unix. Generally when I run the translations on windows, the output file has both carriage returns and line feed where as when ran on unix will have only line feed. I need to insert carriage return before the line feed. Is there some tool... (2 Replies)
Hi,
I have a situation where I need to remove the carriage return between the lines.
For.eg.
The input file:
1,ad,"adc
sdfd",edf
2,asd,"def
fde",asd
The output file should be
1,ad,adc sdfd,edf
2,asd,def fde,asd
Thanks
Shash (5 Replies)
I want to instert Category:XXXXX into the 2. line
something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong:
sed "2i\\${n}Category:$cat\n"
Sample:
Titel Blahh Blahh abllk sdhsd sjdhf
Blahh Blah Blahh
Blahh
Should look like... (2 Replies)
I keep running into the same problem with the following script. Every time it prints the carrage (line feed) char when I test. I believe that the issue is in the group by but I do not see it. The code is as follows.
SET FEED OFF
SET ECHO OFF
SET HEADING OFF
SET LINESIZE 1000
SET PAGESIZE... (1 Reply)
Hi All,
I am reading two files and writing out the file name and count of lines in each file to an output file.
My script looks like this:
echo "input_file1.out;`wc -l < input_file1.out | sed 's/^]*\(.*\)]*$/\1/'` " > comp_file1.out
echo "input_file2.out;`wc -l < input_file2.out | sed... (2 Replies)
Hello!
I have one strange question - let's say I have a long, multiple-line string displayed on the terminal using echo, and I would like to make a carriage return to the beginning of this string, no to the beginning of the last line - is something like that possible? I would like to be able to... (1 Reply)
Hi All,
My requirement is to remove the carriage return in from the lines which i am reading if the length is lesser than 1330 and append the next line with it. Below is the realistic example of file structure.
Input file:
Blah blah blah blah Blah blah blah blah
Blah blah blah blah Blah... (16 Replies)
Discussion started by: mad man
16 Replies
LEARN ABOUT DEBIAN
pack_fgets
pack_fgets(3alleg4) Allegro manual pack_fgets(3alleg4)NAME
pack_fgets - Reads a line from the stream. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
char *pack_fgets(char *p, int max, PACKFILE *f);
DESCRIPTION
Reads a line from the stream `f', storing it at location pointed to by `p'. Stops when a linefeed is encountered, or `max' bytes have been
read. The end of line is handled by detecting the right combination of characters for the platform. This supports CR-LF (DOS/Windows), LF
(Unix), and CR (Mac) formats. However, the trailing carriage return is not included in the returned string, in order to provide easy code
portability across platforms. If you need the carriage return, use pack_fread() and/or pack_getc() instead.
Note: This function internally may make calls to pack_ungetc, so you cannot use pack_ungetc directly afterwards.
Example:
char buf[256];
...
while (pack_fgets(buf, sizeof(buf), input_file)) {
/* Process input line. */
}
fclose(input_file);
RETURN VALUE
Returns the pointer `p' on success, or NULL on error.
SEE ALSO pack_fopen(3alleg4), pack_fopen_chunk(3alleg4), pack_fread(3alleg4), pack_getc(3alleg4), pack_ungetc(3alleg4)Allegro version 4.4.2 pack_fgets(3alleg4)