now i am trying something like this to work.
- read the csv file
- put the lines in a row array
- next loop would be to parse each row to get the columns
csv file
script:
is this possible?
appreciate all your replies guys. thank you!
Last edited by 3vilwyatt; 02-19-2010 at 06:56 AM..
Reason: added csv file
Hi all
I have file f1 like this:
Set AM/PM indicator to PM started|14155|
Generate Error Re|7|
Projected Cash Ba|741|
Roll System Date |4|
Projected Cash Balances started|2|
Process Mark To Market started|13429|
Process paydowns started|14189|
Process Fixed Inc|439|
Process Mark To... (3 Replies)
Hi guys,
i have a big file with the following format.This includes header(H),detail(D) and trailer(T) information in the file.My problem is i have to search for the character "6h" at 14 th and 15 th position in all the records .if it is there i have to write all those records into a... (1 Reply)
#!/bin/bash
i=0
cat 1.csv | while read fileline
do
echo "$fileline"
IFS="#" flds=( $fileline )
nrofflds=${#flds}
echo "noof fields$nrofflds"
fld=0
while
do
echo "noof counter$fld"
echo "$nrofflds"
#fld1="${flds}" trying to store the content of line to fields but i... (4 Replies)
Hi,
I am working on the script to parsing the specific message like "aaaa" in multiple log files like N1-***,N2-***,N3-***...
The script is to find the list of lof files which contains the message "aaaa" and export the list into excel filE.
Can anyone give help?
Thanks (2 Replies)
I'm writing a bash script that reads a file location from a user, and I'm wondering how to get the script to accept tab to auto complete the directories that are input. (8 Replies)
Raw Results:
results|192.168.2|192.168.2.1|general/udp|10287|Security Note|For your information, here is the traceroute from 192.168.2.24 to 192.168.2.1 : \n192.168.2.24\n192.168.2.1\n\n
results|192.168.2|192.168.2.1|ssh (22/tcp)|22964|Security Note|An SSH server is running on this port.\n... (2 Replies)
Hello,
I am trying to make a bash script that can pull data from a file and then change one part of said data.
I want to search by username and pull the full line. That way there is a way to replace just one part of that line then return it back to the file.
My Data is stored like:
... (1 Reply)
For eg: I have sample.txt file with 4 rows of record like:
user1|password1
user2|password2
user3|password3
user4|password4
The username and password is sepsrated by '|'
I want to get the 1st row value from the file and assign it to two different variables(username and password)
in my... (1 Reply)
Ok, so I have a bash script with an embedded expect statement.
Inside of the expect statement, i'm trying to pull all of the non-comment lines from the /etc/oratab file one at a time.
Here's my command:
cat /etc/oratab |sed /^s*#/d\ | awk 'NR==1'|awk -F: '{print \"$1\"}'|. oraenv
Now,... (0 Replies)
Hi all,
I have a moderate size (300 lines) BASH Shell script that performs various tasks on different source reports (CSV files). One of the tasks that it performs, is to use SED to replace 'non-conforming' titles with conformant ones. For example "How to format a RAW Report" needs to become... (3 Replies)
Discussion started by: richardsantink
3 Replies
LEARN ABOUT DEBIAN
cbcodec
CBCODEC(1) Quick Database Manager CBCODEC(1)NAME
cbcodec - popular encoders and decoders
SYNOPSIS
cbcodec url [-d] [-br] [-rs base target] [-l] [-e expr] [file]
cbcodec base [-d] [-l] [-c num] [-e expr] [file]
cbcodec quote [-d] [-l] [-c num] [-e expr] [file]
cbcodec mime [-d] [-hd] [-bd] [-part num] [-l] [-ec code] [-qp] [-dc] [-e expr] [file]
cbcodec csv [-d] [-t] [-l] [-e expr] [-html] [file]
cbcodec xml [-d] [-p] [-l] [-e expr] [-tsv] [file]
cbcodec zlib [-d] [-gz] [-crc] [file]
cbcodec lzo [-d] [file]
cbcodec bzip [-d] [file]
cbcodec iconv [-ic code] [-oc code] [-ol ltype] [-cn] [-wc] [-um] [file]
cbcodec date [-wf] [-rf] [-utc] [str]
DESCRIPTION
This manual page documents briefly the cbcodec commands.
cbcodec is a tool to use encoding and decoding features provided by Cabin. This command is used in the above format. file specifies a
input file. If it is omitted, the standard input is read.
OPTIONS
A summary of options is included below. For a complete description, see the file:///usr/share/doc/qdbm-doc/spex.html#cabincli.
-d perform decoding (unescaping), not encoding (escaping).
-br break up URL into elements.
-rs resolve relative URL.
-l output the tailing newline.
-e expr
specify input data directly.
-c num limit the number of columns of the encoded data.
-hd parse MIME and extract headers in TSV format.
-bd parse MIME and extract the body.
-part num
parse MIME and extract a part.
-ec code
specify the input encoding, which is UTF-8 by default.
-qp use quoted-printable encoding, which is Base64 by default.
-dc output the encoding name instead of the result string when decoding.
-t parse CSV. Convert the data into TSV. Tab and new-line in a cell are deleted.
-html parse CSV. Convert the data into HTML.
-p parse XML. Show tags and text sections with dividing headers.
-tsv parse XML. Show the result in TSV format. Characters of tabs and new-lines are URL-encoded.
-gz use GZIP format.
-crc output the CRC32 checksum as hexadecimal and big endian.
-ic code
specify the input encoding, which is detected automatically by default.
-oc code
specify the output encoding, which is UTF-8 by default.
-ol ltype
convert line feed characters, with `unix'(LF), `dos'(CRLF), and `mac'(CR).
-cn detect the input encoding and show its name.
-wc count the number of characters of the input string of UTF-8.
-um output mappings of UCS-2 characters and C strings of UTF-16BE and UTF-8.
-wf output in W3CDTF format.
-rf output in RFC 1123 format.
-utc output the coordinate universal time.
SEE ALSO qdbm(3), cabin(3).
AUTHOR
QDBM was written by Mikio Hirabayashi <mikio@fallabs.com>.
This manual page was written by Fumitoshi UKAI <ukai@debian.or.jp>, for the Debian project (but may be used by others).
Man Page 2005-05-23 CBCODEC(1)