11-27-2018
Reading flat file content
is there any unix tools that can read the text files like through SQL queries? (ie in Hadoop, Impala DB support flat file query)
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi Gurus,
I am having an requirement. i have to read a list file which contains file names and send mail to different users based on the files in the list file.
eg. if file a.txt exists then send a mail to a@a.com
simillary for b.txt,c.txt etc.
Thanks for your help,
Nimu (6 Replies)
Discussion started by: nimu1979
6 Replies
2. Shell Programming and Scripting
I am new to shell scripting and I have to to the following
I have a flat file with storename(lenth 20) , emailaddress(lenth 40), location(15). There is NO delimiters in that file.
Like the following str00001.txt
StoreName emailaddress location... (3 Replies)
Discussion started by: willywilly
3 Replies
3. Shell Programming and Scripting
Hi,
I am reading a file line by line using read line function of while loop. Each line contains 4 fields. I want to take these 4 values in 4 variables in each iteration so that i can use them in my script. The issue here is that my awk command is returning awkward results -
Here is a sample line... (8 Replies)
Discussion started by: garman
8 Replies
4. Shell Programming and Scripting
Hi Folks,
I have a file without any delimeters and it is a flat file. Example,
my raw data looks: x25abcy26defz27ghi.....
Now, could you please any one help me to program to split this into variable and create a text file. I want a output as below
Name Age Number
x 25 abc... (14 Replies)
Discussion started by: Jerald Nathan
14 Replies
5. Shell Programming and Scripting
Need to develop a unix shell script for the below requirement and I need your assistance:
1) search for file.log and file.bad file in a directory and read them
2) pull out "Load_Start_Time", "Data_File_Name", "Error_Type" from log file
4) concatinate each row from bad file as... (3 Replies)
Discussion started by: mlpathir
3 Replies
6. Shell Programming and Scripting
I have 'n' number of files in a folder .each file in the folder "myfolder" is having the content like.
COLNAME
------------
AAAAAA
BBBBBB
CCCCCC
DDDDDD
...
...
...
ZZZZZZ
26 recrod(s) selected.
My request is by reading each file in "myfolder" and format each file such a way... (18 Replies)
Discussion started by: rocking77
18 Replies
7. Shell Programming and Scripting
I have a requirement to read the xml file and split the files into two diffrent files in Unix shell script. Could anyone please help me out with this requirement.
Sample file
---------------
0,<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Information... (3 Replies)
Discussion started by: kmanivan82
3 Replies
8. Shell Programming and Scripting
hi
i have written a script for reading a csv file and creating a flat file, suggest if this script can be optimized
#----------------
FILENAME="$1"
SCRIPT=$(basename $0)
#-----------------------------------------//
function usage
{
echo "\nUSAGE: $THIS_SCRIPT file_to_process\n"... (3 Replies)
Discussion started by: mprakasheee
3 Replies
9. Shell Programming and Scripting
Hi ,
i have a parameter which has path of a file. Now i need to have another parameter with the content of that file. I tried the belwo script , can any one please help.
I dont want to use cat command to read. Can we do it with out using cat command.
while read line
do... (9 Replies)
Discussion started by: Ravindra Swan
9 Replies
10. Solaris
Dear Gurus
I am stuck with the peice of work and do not know from where to start.
I get a machine generated file which is binary file contain binary data, i want to read binary data as it is without converting into any other format.
i want to read byte by byte.
Please let me know what... (24 Replies)
Discussion started by: guddu_12
24 Replies
LEARN ABOUT PHP
ifx_prepare
IFX_PREPARE(3) 1 IFX_PREPARE(3)
ifx_prepare - Prepare an SQL-statement for execution
SYNOPSIS
resource ifx_prepare (string $query, resource $link_identifier, [int $cursor_def], mixed $blobidarray)
DESCRIPTION
Prepares a $query for later use with ifx_do(3).
For "select-type" queries a cursor is declared and opened. Non-select queries are "execute immediate".
For either query type the number of (estimated or real) affected rows is saved for retrieval by ifx_affected_rows(3).
If the contents of the TEXT (or BYTE) column allow it, you can also use ifx_textasvarchar(1) and ifx_byteasvarchar(1). This allows you to
treat TEXT (or BYTE) columns just as if they were ordinary (but long) VARCHAR columns for select queries, and you don't need to bother with
blob id's.
With ifx_textasvarchar(0) or ifx_byteasvarchar(0) (the default situation), select queries will return BLOB columns as blob id's (integer
value). You can get the value of the blob as a string or file with the blob functions (see below).
PARAMETERS
o $query
- The query string.
o $link_identifier
- The link identifier.
o $cursor_def
- This optional parameter allows you to make this a scroll and/or hold cursor. It's a bitmask and can be either IFX_SCROLL,
IFX_HOLD, or both or'ed together.
o $blobidarray
- If you have BLOB (BYTE or TEXT) columns in the query, you can add a $blobidarray parameter containing the corresponding "blob
ids", and you should replace those columns with a "?" in the query text.
RETURN VALUES
Returns a valid result identifier for use by ifx_do(3), or FALSE on errors.
SEE ALSO
ifx_do(3).
PHP Documentation Group IFX_PREPARE(3)