Guys - Simple code, i am trying to get a number back from sqlplus call to a query. After that, i need to use that number in a loop.
---------------------------------
#!/bin/ksh
VALUE=`sqlplus -silent sh/password@sh <<END
set pagesize 0 feedback off verify off heading off echo off
select... (10 Replies)
Hello, I want remove ^M at end of my files line
if I use command : tr -d '\r' <inp>out it work fine
but get I the same result by manipulating the string ?
I want this because in my text file I manipulate some other part
I have input "the cat^M"
I want output "the cat"
I have made... (3 Replies)
Hi all gurus,
I need help in removing carriage return existed within a record delimited by pipe <|>.
Sample:
A_01|Test1|Testing1|Remarks1
A_02|Test2|Test
ing2|Remarks2
A_03|Test3|Testing3|
Remarks3
Desire output:
A_01|Test1|Testing1|Remarks1
A_02|Test2|Testing2|Remarks2... (10 Replies)
Hi,
I have a pipe delimited file. There are around 700 columns in the file.
The 65th column has carriage return which is causing read issue with our ETL process. I would like to replace the new line characters in 65th field with "nothing"
i have return the following code and need help to... (7 Replies)
Hi,
I try to handle very large numbers with a bash script. I run ssh command in a remote server and store the output in a local variable. But this output contains a return carriage at the end. So I try to remove it by tr But I can't figure out the right notation with printf. So my problem... (6 Replies)
I need to remove the carriage return comes inbetween the record.
Need to have CR only at the end.
I used the below command.
tr -d '\n' < filewithcarriagereturns > filewithoutcarriagereturns
But its removing all the CR and giving one line output.
Input File:
12345
abcdegh... (11 Replies)
How to remove Carriage Return (CRLF) within double quotes in a file. There are multiple CRLFs within double quotes. We are on Ubuntu 14.04.2 LTS.
The file that we are importing is a csv file from unix to windows and the file was formatted to unix2dos. Therefore all lines in the file all have... (12 Replies)
I need to remove new lines and carriage returns from csv file.
Is there anything other than sed and gwak by which we could achieve this ? Any suggestions ? (3 Replies)
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 PLAN9
pack_fopen
pack_fopen(3alleg4) Allegro manual pack_fopen(3alleg4)NAME
pack_fopen - Opens a file according to mode. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
PACKFILE *pack_fopen(const char *filename, const char *mode);
DESCRIPTION
Opens a file according to mode, which may contain any of the flags:
`r' - open file for reading.
`w' - open file for writing, overwriting any existing data.
`p' - open file in packed mode. Data will be compressed as it is written to the file, and automatically uncompressed during read opera-
tions. Files created in this mode will produce garbage if they are read without this flag being set.
`!' - open file for writing in normal, unpacked mode, but add the value F_NOPACK_MAGIC to the start of the file, so that it can later be
opened in packed mode and Allegro will automatically detect that the data does not need to be decompressed.
Instead of these flags, one of the constants F_READ, F_WRITE, F_READ_PACKED, F_WRITE_PACKED or F_WRITE_NOPACK may be used as the mode
parameter.
The packfile functions also understand several "magic" filenames that are used for special purposes. These are:
`#' - read data that has been appended to your executable file with the exedat utility, as if it was a regular independent disk file.
`filename.dat#object_name' - open a specific object from a datafile, and read from it as if it was a regular file. You can treat nested
datafiles exactly like a normal directory structure, for example you could open `filename.dat#graphics/level1/mapdata'.
`#object_name' - combination of the above, reading an object from a datafile that has been appended onto your executable.
With these special filenames, the contents of a datafile object or appended file can be read in an identical way to a normal disk file, so
any of the file access functions in Allegro (eg. load_pcx() and set_config_file()) can be used to read from them. Note that you can't write
to these special files, though: the fake file is read only. Also, you must save your datafile uncompressed or with per-object compression
if you are planning on loading individual objects from it (otherwise there will be an excessive amount of seeking when it is read).
Finally, be aware that the special Allegro object types aren't the same format as the files you import the data from. When you import data
like bitmaps or samples into the grabber, they are converted into a special Allegro-specific format, but the `#' marker file syntax reads
the objects as raw binary chunks. This means that if, for example, you want to use load_pcx() to read an image from a datafile, you should
import it as a binary block rather than as a BITMAP object.
Example:
PACKFILE *input_file;
input_file = pack_fopen("scores.dat", "rp");
if (!input_file)
abort_on_error("Couldn't read `scores.dat'!");
RETURN VALUE
On success, pack_fopen() returns a pointer to a PACKFILE structure, and on error it returns NULL and stores an error code in `errno'. An
attempt to read a normal file in packed mode will cause `errno' to be set to EDOM.
SEE ALSO pack_fclose(3alleg4), pack_fopen_chunk(3alleg4), packfile_password(3alleg4), pack_fread(3alleg4), pack_getc(3alleg4),
file_select_ex(3alleg4), pack_fopen_vtable(3alleg4), expackf(3alleg4)Allegro version 4.4.2 pack_fopen(3alleg4)