Sponsored Content
Top Forums Shell Programming and Scripting Changing every other comma to point Post 302977203 by RudiC on Thursday 14th of July 2016 06:19:05 AM
Old 07-14-2016
Try
Code:
sed 's/$/,/; s/\([^,]*\),\([^,]*,\)/\1.\2/g; s/,$//' file
1.188,1.250,0.757,0.946,8.960
1.257,1.300,0.802,1.002,9.485
1.328,1.350,0.846,1.058,10.021
1.381,1.400,0.880,1.100,10.418
0.003,0.200,0.000,0.000,0.020

This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Fibre connection Point to Point SUN

Anyone know of a guide or instructions for Solaris I got to configure a SBUS HBA to talk to a tape robot. I have done this on a switch but not point to point. just going HBA >>>>> TAPE Fibre simple two nodes Kie (6 Replies)
Discussion started by: kie
6 Replies

2. Programming

changing entry point

hi... just wanted to check how i can the entry point of a program... i tried using the #pragma directive but it doesnt seem to be workin... #pragma comment(linker,"/ENTRY:startupfunction") #include<stdio.h> void startupfunction() { printf("in print\n"); main(); } int main() {... (4 Replies)
Discussion started by: strider
4 Replies

3. Solaris

Neat trick: Changing the permissions of an underlying mount point

A colleague of mine showed me a neat little trick in Solaris (I would guess sol 10 but perhaps earlier versions too) that I'd not seen before and thought I'd share here in case it's new for someone else also. As most of you know, Solaris has the annoying habit of producing error messages when... (6 Replies)
Discussion started by: Smiling Dragon
6 Replies

4. Shell Programming and Scripting

Pull Data After Comma if 2 word before comma

Hi, I am trying to truncate word after comma in a file ONLY if there are already 2 words BEFORE comma. If there is one word or 3 or more words BEFORE comma, then I have to leave the data AS IS. See below for example. Input File : John Smith, Manager Smith, John Frank J F K... (2 Replies)
Discussion started by: msalam65
2 Replies

5. Shell Programming and Scripting

How to perform a hexdump using dd from start point to end point?

hi, I would like to ask or is it possible to dump a hex using dd from starting point to end point just like the "xxd -s 512 -l 512 <bin file>" I know the redirect hexdump -C but i can't figure it out the combination options of dd. Hope someone can share their knowledge.. Thanks in... (3 Replies)
Discussion started by: jao_madn
3 Replies

6. Shell Programming and Scripting

How to grep after the first comma till the next comma in a line

Hi Can any one pls tell me how to grep this line POPULATION,69691,20120509 I want the number 69691 from the above line. How to grep from the first comma till the next comma. Thank You.:confused: (8 Replies)
Discussion started by: rxg
8 Replies

7. Shell Programming and Scripting

Need Help - comma inside double quote in comma separated csv,

Hello there, I have a comma separated csv , and all the text field is wrapped by double quote. Issue is some text field contain comma as well inside double quote. so it is difficult to process. Input in the csv file is , 1,234,"abc,12,gh","GH234TY",34 I need output like below,... (8 Replies)
Discussion started by: Uttam Maji
8 Replies

8. Shell Programming and Scripting

Replace comma and blank with comma and number

I, I have a file and i need to replace comma and blank space with comma and 0. cat file.txt a,5 b,1 c, d, e,4 I need the output as cat file.txt a,5 b,1 c,0 d,0 (4 Replies)
Discussion started by: jaituteja
4 Replies

9. Shell Programming and Scripting

Replace spaces with underscores up to first comma but not after the comma

I have a comma delimited file of major codes and descriptions. I want to replace all occurrences of spaces with underscores up to the first comma (only in the first field), but not replace spaces following the comma. For instance I have the following snippet of the file: EK ED,Elementary and... (7 Replies)
Discussion started by: tdouty
7 Replies

10. Shell Programming and Scripting

awk to parse comma separated field and removing comma in between number and double quotes

Hi Experts, Please support I have below data in file in comma seperated, but 4th column is containing comma in between numbers, bcz of which when i tried to parse the file the column 6th value(5049641141) is being removed from the file and value(222.82) in column 5 becoming value of column6. ... (3 Replies)
Discussion started by: as7951
3 Replies
MOUNT_KERNFS(8) 					    BSD System Manager's Manual 					   MOUNT_KERNFS(8)

NAME
mount_kernfs -- mount the /kern file system SYNOPSIS
mount_kernfs [-o options] /kern mount_point DESCRIPTION
The mount_kernfs command attaches an instance of the kernel parameter namespace to the global filesystem namespace. The conventional mount point is /kern. The directory specified by mount_point is converted to an absolute path before use. This command is normally executed by mount(8) at boot time. The filesystem includes several regular files which can be read, some of which can also be written. The contents of the files is in a machine-independent format, either a string, or an integer in decimal ASCII. Where numbers are returned, a trailing newline character is also added. The options are as follows: -o Options are specified with a -o flag followed by a comma separated string of options. See the mount(8) man page for possible options and their meanings. FILES
boottime the time at which the system was last booted (decimal ASCII). copyright kernel copyright message. hostname the hostname, with a trailing newline. The hostname can be changed by writing to this file. A trailing newline will be stripped from the hostname being written. hz the frequency of the system clock (decimal ASCII). ipsecsa the directory that contains IPsec security associations (SA) in PF_KEY format. Filenames are SPI in decimal number. The content of files can be inspected by using setkey(8). ipsecsp the directory that contains IPsec security policies in PF_KEY format. Filenames are security policy ID in decimal number. The content of files can be inspected by using setkey(8). loadavg the 1, 5 and 15 minute load average in kernel fixed-point format. The final integer is the fix-point scaling factor. All numbers are in decimal ASCII. msgbuf the kernel message buffer, also read by syslogd(8), through the log device, and by dmesg(8). pagesize the machine pagesize (decimal ASCII). physmem the number of pages of physical memory in the machine (decimal ASCII). rootdev the root device. rrootdev the raw root device. time the second and microsecond value of the system clock. Both numbers are in decimal ASCII. version the kernel version string. The head line for /etc/motd can be generated by running: ``sed 1q /kern/version'' SEE ALSO
mount(2), unmount(2), ipsec(4), fstab(5), dmesg(8), mount(8), setkey(8), syslogd(8) HISTORY
The mount_kernfs utility first appeared in 4.4BSD. BUGS
This filesystem may not be NFS-exported. lkm(4) version does not support IPsec-related files/directories. BSD
September 8, 2003 BSD
All times are GMT -4. The time now is 05:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy