08-17-2005
sed or an awk script should help
num desc ind code
11 hi,feather y food
121 edible,oil y food
100 meal-pack y food
010 health,prod
120 lunch,pack
The above one is a flat file with the first line as column name.This is a comma delimited file with quote character as double quotes.
ie desc column has fields like "Hi,Feather" or may be "Hi,Fea"ther"
in short the record might look like
"10","Hi,Feather","y","Food"
this should go into the file but as in the example file above.Since delimiter is comma here ,I wud like to know if anyone can give me a script which can parse this the way i showed above and put into the file.ie Hi,Feather shud be in one column.Note: Its a vARIABLE LENGTH RECORD.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a file with three fields, where the first two fields are of fixed length, left justified, and right padded with spaces. The third field is truncated to the length of the data (max length 5), and possibly contains a single letter. Each field is separated by an additional space. How can I... (1 Reply)
Discussion started by: Duckman
1 Replies
2. UNIX for Dummies Questions & Answers
Hi there I'am new here and could use some help. I probably haven't used the correct terms but have tried my best.
I work for a newspaper who run a database for their classifieds.
All the adds are input on an atex system and then each day dumped into three files. (*.eps *.srt *.prn)
I'am trying... (1 Reply)
Discussion started by: StiCKmaN
1 Replies
3. Shell Programming and Scripting
hi guys,
perhaps you can help me again
I have a file generated with the AIX-tool lparstat the looks like this:
%user %sys %wait %idle physc %entc lbusy app vcsw phint
----- ---- ----- ----- ----- ----- ------ --- ---- -----
21.8 8.8 1.8 67.6 0.17 34.1 9.4 7.22 ... (3 Replies)
Discussion started by: funksen
3 Replies
4. Shell Programming and Scripting
Hi, was hoping someone may be able to help me with a script solution to move one line to another line from my log file:
My log file currently looks like this:
01:21:12:383 Request
01:21:12:639 Response
01:21:12:386 Request
01:21:12:639 Response
01:21:12:389 Request
01:21:12:640 Response... (8 Replies)
Discussion started by: jimbobla
8 Replies
5. Shell Programming and Scripting
Hi ! I'm working into my first bash script to make some xml modification and it's going to make me crazy lol .. so I decide to try into this forum to take some ideas from people that really know about this!
This is my situation I've and xml file with a lots of positional values with another tags... (9 Replies)
Discussion started by: juampal
9 Replies
6. Programming
Hi, I want to read a file from the command line and remove all the spaces, tabs in it, replacing it with comma(,), and write it to a new file. can you help me out with this scenario. (1 Reply)
Discussion started by: sudhanshu12788
1 Replies
7. Shell Programming and Scripting
Hi,
I thought I am getting pretty good with sed and awk, but now I dont have a way out of this question.
I have a table 0.5 16
1.3 14
0.25 15
0.85 16
I want to make a column 3 which contains values that are (corresponding $2 value/sum of all $2).
Please help me out here.
Thanks. (6 Replies)
Discussion started by: jamie_123
6 Replies
8. Shell Programming and Scripting
Below am trying to separate FA-7A:1, In output file it should display 7A 1
Command am using
Gives same output as below format:
22B7 10000000c9720873 0
22B7 10000000c95d5d8b 0
22BB 10000000c97843a2 0
22BB 10000000c975adbd 0
Not showing FA ports as required format... (5 Replies)
Discussion started by: aix_admin_007
5 Replies
9. UNIX for Dummies Questions & Answers
Hi,
After looking at the differents post on this forum, I am convinced that I will benefit from the experience of advanced Unix user on some script I have already done for an aeronautical study. Here is one of them :
Step 1 :
sed -e "s/??/00/g" Base_Awk.txt > Awk_Cut_00.txt4;
sed... (11 Replies)
Discussion started by: Marc_Camoc
11 Replies
10. Shell Programming and Scripting
Hi All
I am having a file as shown below
File1#
modyle 1 {
test jsj
hhsjh 13e3
jsjjs
}
memP(dbg_trace) {
ajjs
jsjs
jsjs
Test(claer) {
jsjs (7 Replies)
Discussion started by: kshitij
7 Replies
LEARN ABOUT DEBIAN
glcells
glcells(6x) XScreenSaver manual glcells(6x)
NAME
glcells - growing cells graphics hack
SYNOPSIS
glcells [-display host:display.screen] [-window] [-root] [-install] [-visual visual] [-delay num] [-pause num] [-maxcells num] [-radius
num] [-seeds num] [-quality num] [-minfood num] [-maxfood num] [-divideage num] [-mindist num] [-keepold] [-wireframe] [-fps]
DESCRIPTION
The glcells program draws cells that divide exponentially, eat and eventually die.
OPTIONS
glcells accepts the following options:
-window Draw on a newly-created window. This is the default.
-root Draw on the root window.
-install
Install a private colormap for the window.
-visual visual
Specify which visual to use. Legal values are the name of a visual class, or the id number (decimal or hex) of a specific visual.
-pause num
Specifies the pause at the end of the animation (all cells dead or maximum amount of cells reached). Unit is in frames, default 20.
-maxcells num
Specifies the maximum number of cells on screen (dead cells also count, even if invisible). Default is 800.
-radius num
Specifies the radius of the cells. Default is 40.
-seeds num
Specifies the number of cells when animation starts. Default is 1.
-quality num
Specifies subdivision quality of the spheres used to draw the cells [0...5]. Default is 3.
-minfood num
Food is ditributed randomly on the screen (Yes, the cells need to eat). This parameter specifies the minimum amount of food per
pixel. Default is 5.
-maxfood num
Food is ditributed randomly on the screen (Yes, the cells need to eat). This parameter specifies the maximum amount of food per
pixel. Default is 20.
-divideage num
Specifies the minimum age in frames a cell needs to have before beeing able to divide. Default is 20
-mindist num
Specifies the minimum distance between cells. Default 1.4
-delay num
How long to pause between frames. Default is 20000, or 0.02 second.
-fps Display the current frame rate, CPU load, and polygon count.
-wireframe
Draw wireframe only.
-keepold
Dead cells stay on screen.
ENVIRONMENT
DISPLAY to get the default host and display number.
XENVIRONMENT
to get the name of a resource file that overrides the global resources stored in the RESOURCE_MANAGER property.
SEE ALSO
X(1), xscreensaver(1) xscreensaver-demo(1),
COPYRIGHT
Copyright (C) 2007 by Matthias Toussaint. Permission to use, copy, modify, distribute, and sell this software and its documentation for
any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting documentation. No representations are made about the suitability of this software
for any purpose. It is provided "as is" without express or implied warranty.
AUTHOR
Matthias Toussaint <glcells@mtoussaint.de>, 17-Jun-2007, http://www.mtoussaint.de/bits.html.
X Version 11 5.15 (28-Sep-2011) glcells(6x)