Search Results

Search: Posts Made By: naveen.kuppili
13,916
Posted By Aia
It is because I did not pay enough attention....
It is because I did not pay enough attention. Apologies.
Please, try the following:
perl -ne '@c=/(\w+)"\s+:\s+("[^"]*")/ and push @h, $c[0] and push @r, $c[1]; END{$"=","; print "@h\n@r\n"}'...
13,916
Posted By junior-helper
#!/bin/bash header=(); values=() while...
#!/bin/bash

header=(); values=()

while IFS=":" read var val
do
if [[ "$var" =~ "\"" ]]; then

var="${var//\"/}"; var="${var% }"
[[ "${#header[@]}" -eq "0" ]] && header=("$var") ||...
13,916
Posted By Aia
Would this work? perl -ne...
Would this work?
perl -ne '@c=/(\w+)"\s+:\s+("[^"]+")/ and push @h, $c[0] and push @r, $c[1]; END{$"=","; print "@h\n@r\n"}' naveen.file
Output:...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 10:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy