Note that there are some explanatory texts on larger screens.

plurals
  1. POFormat data (Sorry for the large content)
    primarykey
    data
    text
    <p>I have a file with contents like this:</p> <pre><code>Hostname: Solaris10; Modified: /software, /nsr, /var, /home; Hostname: Win2k3sp1; Modified: "MSSQL$SQLEXPRESS:", "MSSQL$VIM_SQLEXP:"; Hostname: WinXP; Modified: "D:\\1", "C:\\Inetpub", "C:\\Config.Msi", "C:\\Documents and Settings"; Hostname: Win2k3sp1; Modified: "C:\\Program Files\\Internet Explorer", "C:\\Program Files\\Common Files"; Hostname: Centos5; Modified: /home, /etc, /dev, /boot; Hostname: WinXP; Modified: "D:\\Program Files (x86) (x86) (x86)", "D:\\Program Files (x86)", "D:\\98fdac7656d6632b28"; Hostname: Centos5; Modified: /opt, /sys, /usr, /root; </code></pre> <p>And I need to format it like this:-</p> <pre><code>Centos5,/home Centos5,/etc Centos5,/dev Centos5,/boot Centos5,/opt Centos5,/sys Centos5,/usr Centos5,/root Solaris10,/software Solaris10,/nsr Solaris10,/var Solaris10,/home Win2k3sp1,MSSQL$SQLEXPRESS: Win2k3sp1,MSSQL$VIM_SQLEXP: Win2k3sp1,C:\\Program Files\\Internet Explorer Win2k3sp1,C:\\Program Files\\Common Files WinXP,D:\\Program Files (x86) (x86) (x86) WinXP,D:\\Program Files (x86) WinXP,D:\\98fdac7656d6632b28 WinXP,D:\\1 WinXP,C:\\Inetpub WinXP,C:\\Config.Msi WinXP,C:\\Documents and Settings </code></pre> <p>I can use arrays, text modifiers anything.... but the procedure should be as short/efficient as possible.</p> <p>I have achieved it using for, while and lot of sed substitutions and I don't like it :( !</p> <p>Any help will be much appreciated. I can use only 'bash' command on Solaris10/RHEL5</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload