04-27-2009
Data fetched from text file and save in a csv file
Hi i have wriiten a script which fetches the data from text file, and saves in the output in a text file itself, but i want that the output should save in different columns.
I have the output like:
For Channel:response_time__24.txt
1547 data points
0.339
0.299
0.448
0.581
7.380
0.372
For Channel:response_time__48.txt
2878 data points
0.350
0.305
0.446
0.566
9.070
0.441
I want that for 48 channels it should come in a different column, cureently i am saving it in a text file itself.
Script i have wriiten is:
for i in `ls *.txt`
do
echo $i;
echo -e "
" >> 4;
echo "For Channel:`ls $i`" >>4;
`tail -37 "$i" >2`;
`grep -v -E 'Calculating|Remaining' 2 >3`;
echo -e "
" >> 4;
`cut -f2 -d":" <3 >>4`;
\rm 2 3;
done;
Please help me, how do i save the output like
For Channel:response_time__24.txt For Channel:response_time__48.txt
1547 data points 2878 data points
0.339 0.350
0.299 0.305
0.448 0.446
0.581 0.566
7.380 9.070
0.372 0.441
Thanks
Rohit
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Could any one help me in basic shell script to export text file data to csv.
I need to export only particular data from text file to csv column.
I am a newbie to UNIX could anyone help me with sample script code (3 Replies)
Discussion started by: l_jayakumar
3 Replies
2. Shell Programming and Scripting
Hi
I need to execute a select statement in a solaris environment with oracle database. The select statement returns number of rows of data.
I need the data to be inserted into a CSV file with proper format. For that we normally use "You have to select all your columns as one big string,... (2 Replies)
Discussion started by: rdhanek
2 Replies
3. UNIX for Dummies Questions & Answers
Hi Unix gurus,
Maybe it is too much to ask for but please take a moment and help me out. A very humble request to you gurus. I'm new to Unix and I have started learning Unix. I have this project which is way to advanced for me.
File format: CSV file
File has four columns with no header... (8 Replies)
Discussion started by: arvindosu
8 Replies
4. Shell Programming and Scripting
Hi Guys,
I have blank file A.txt
I will run the script xyz.sh
First i want to open a.txt file...
Now i will enter some data like
XYZ
ABC
PQR
..
Save it and keep continue my script....
END of my script.
Thanks (1 Reply)
Discussion started by: asavaliya
1 Replies
5. Shell Programming and Scripting
FILE_ID extraction from file name and save it in CSV file after looping through each folders
My files are located in UNIX Server, i want to extract file_id and file_name from each file .and save it in a CSV file. How do I do that?
I have folders in unix environment, directory structure is... (15 Replies)
Discussion started by: princetd001
15 Replies
6. Shell Programming and Scripting
Gents
Using the script attached (raw2csv). i use to create the file .csv.. The input file is called 201.raw.
Kindly can you check if there is easy way to do it. The script works fine but takes a lot time to process
Thanks for your help (8 Replies)
Discussion started by: jiam912
8 Replies
7. Shell Programming and Scripting
Hi, all
I want to sort a csv file based on timestamp from oldest to newest and save the output as csv file itself. Here is an example of my csv file.
test.csv
SourceFile,DateTimeOriginal
/home/intannf/foto/IMG_0739.JPG,2015:02:17 11:32:21
/home/intannf/foto/IMG_0749.JPG,2015:02:17 11:37:28... (10 Replies)
Discussion started by: refrain
10 Replies
8. Shell Programming and Scripting
Hi,
I have another problem. I want to sort another csv file by the first field.
result.csv
SourceFile,Airspeed,GPSLatitude,GPSLongitude,Temperature,Pressure,Altitude,Roll,Pitch,Yaw
/home/intannf/foto5/2015_0313_090651_219.JPG,0.,-7.77223,110.37310,30.75,996.46,148.75,180.94,182.00,63.92 ... (2 Replies)
Discussion started by: refrain
2 Replies
9. Shell Programming and Scripting
I have input data looks like this which is a part of a csv file
7,1265,76548,"0102:04"
8,1266,76545,"0112:04"
I need to make the output data should look like this and the output data will be part of text file:
7|1265000 |7654899 |A|
8|12660000 |76545999 |B|
The logic behind the... (6 Replies)
Discussion started by: RJG
6 Replies
fcp(7D) Devices fcp(7D)
NAME
fcp - Fibre Channel protocol driver
DESCRIPTION
The fcp driver is the upper layer protocol that supports mechanisms for transporting SCSI-3 commands over Fibre Channel. The fcp driver,
which interfaces with the Sun Fibre Channel transport library fctl(7D), supports the standard functions provided by the SCSA interface.
FILES
/kernel/drv/fcp
32-bit ELF kernel driver (x86)
/kernel/drv/amd64/fcp
64-bit ELF kernel driver (x86)
/kernel/drv/sparcv9/fcp
64-bit ELF kernel driver (SPARC)
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Architecture |SPARC |
+-----------------------------+-----------------------------+
|Interface stability |Unknown |
+-----------------------------+-----------------------------+
|Availability |SUNWfcp |
+-----------------------------+-----------------------------+
SEE ALSO
prtconf(1M), driver.conf(4), fctl(7D), fp(7D), usoc(7D)
Writing Device Drivers
Fibre Channel Physical and Signaling Interface (FC-PH) ANSI X3.230: 1994
Fibre Channel Generic Services (FC-GS-2) Project 1134-D
Fibre Channel Arbitrated Loop (FC-AL) ANSI X3.272-1996
Fibre Channel Protocol for SCSI (FCP) ANSI X3.269-1996
SCSI-3 Architecture Model (SAM) Fibre Channel Private Loop SCSI Direct Attach (FC-PLDA) ANSI X3.270-1996
Fabric Loop Attachment (FC-FLA), NCITS TR-20:1998
SunOS 5.10 20 Oct 2004 fcp(7D)