I have yaml file with have parameter like this caCertificates: {}   and I want replace it with below contents caCertificates:   hike.crt: |     -----BEGIN CERTIFICATE-----     MIIFOzCCAyOgAwIBAgIUIyHpTZS7DmOv1wOXytwFAZZTJmYwDQYJKoZIhvcNAQEL     BQAwJTEjMCEGA1UEAxMaTUYgUkUgQ0Egb24gVmF1bHQgN2M3ODM2NDYwHhcNMjEw     NDA3MTExMDIxWhcNMzEwNDA1MTExMDQwWjAlMSMwIQYDVQQDExpNRiBSRSBDQSBv     biBWYXVsdCA3Yzc4MzY0NjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIB     ALwivEBn9LmCc15++MbGCLoUnAbTLY60/XH8lLBa8O3u0Ay7uLIId+9P1PaWo1nP     Ku5lYrScrczlElEKcKhTl3W54llGe7HoDsnkJRerX9gDeAMpJm099INovneTU73E     YVtZdAB+PN8VM1/noZz2xX1MtEmoJ52tWDUnl4lyFbCY2sSsgAX5wzk9rHpzzGKF     E1Lt6s8Df6j6Z1uJ4GIMuBKKYvAtyRYl/aznVLMmNaOO2SS6/PhF3QgwQsO3mRIZ     s+IpHDiyOmiMM7tFYE8VD7I4S30+8oH18w6d0geXTvT7SybDRO2EDXXUalIsRzyJ     xyH23vAmjcelYiBpHGICEOoi0eeJg+DyQB8i5gnqOMFiOC3fRRg+w4dZvOk0uQy/     E3jMgDwJ1Xu6gcGE7SveQTyRoxq3AbAGcEHorfFp9iKKs7Y/2WSv/SsRUnDfa8kE     OGmTvhiZoizRPkBeir6LEznf3cdG3NCYyZ/uU8vHtL+LxQ6yjIn6yC0BCNSR6d2t     rcoOaZahr8nYn8VlukGUFS2x0szcVBEiiOgbtc35yHA6+MNafenwslg+CFjCvQzr     U/CSHuKD6+KyowwLAX4g0i42NvOz4lKhnvCqKodXlIMPG5FRLYILZl6jAlVn7YPm     oLfF7cvlMYjscufXD+0fP1O20CDdmVgBNIb0LVttS32rAgMBAAGjYzBhMA4GA1Ud     DwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSOtPatITjgddDk     5+0/dlUaPDW9nDAfBgNVHSMEGDAWgBSOtPatITjgddDk5+0/dlUaPDW9nDANBgkq     hkiG9w0BAQsFAAOCAgEAbV64Ejz/VDSE0t+yaWlu283QCEvGkAImajpsAYNwrfnz     U8w8bJMMKR0yknAwZCJOIloLHvP6CgHMKrDjc4CcbuoSVnKEjo7DbjbNjEaA9wWg     Bbvo9Lw4MwwKkWkatFnlcxyh0SDQzYBp7CCK4CG5NYZTq7Rr1cfTNLkYu9p9sxxe     8ER6ST5bPnfPZeVUELXoLRfgMycylBzEvbEv71S+CLOP3ACj4FGXSzFCYQtlqS8+     U/B5vhHUvNYPwXUOScutMo402CSeB9oYN5bGTK6Uqln/viZc0bAgzATiZS+tT4qP     k47PIsODRjnc5Xe9IyuAeIG2yvedvn/rhz0+e7RAx0sVwi3AhwdFbfRkM0nCuHYx     Jys9HpI6+4oBR/+S61THTvP9s0vygr6/2PXHYocsqTUdTtUryyxelCRQygdXuHU8     TsuYMiKStR/lAXEEnKQOvUV3xyDWoHGwsjGWkR4kAzUigGuQPWgpbCVBgGFnbSM1     v8ZmLFPfVbRJNVPlDkxFluSedFdkvvVJmBG68eqQNBwIdDVqKebHES/vp3c1PYB4     TA9LBiJQIvROTw4ZPtMOe7EuZrN5ybWIxZninFvJwoDqJHpb4s1qCy7Ru9CzsYqx     ERx3xliLnFgGPtMIrNofvsSq4u7+/rPExYaF8vfkBtF3r50LFiy9EbqzHQtORdY=     -----END CERTIFICATE-----  I want to read a file called RE-ca.crt and replace it with caCertificates: {}
72768
I'm trying to execute this command  sed -i -e "s/BASE_64/$BASE_64/" FILE_NAME   where $BASE_64 is a base 64 representation of a file content.  sed gives me an error since the string is too long.     Argument list too long   How is it possible to avoid this error?
26473
I want to create self signed certificate for the website. The old certificate expired few days ago. There are more than one NameVirtualHosts hosted on systems. The commands I am using to create certificate are taken from one tutorial website and are:  openssl genrsa -des3 -out server.key 1024 openssl req -new -key server.key -out server.csr  cp server.key server.key.org openssl rsa -in server.key.org -out server.key openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt   After this in ssl.conf file I have specified under VirtualHost section along with old settings done by other admin  SSLEngine on SSLCertificateFile &lt;full_path&gt;/server.crt SSLCertificateKeyFile &lt;full_path&gt;/server.key   On starting the server I am getting following messages in log file and server fails to start.  In error_log file messages are   [Mon Jun 01 23:52:46 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)   In ssl_error_log file messages are   [Mon Jun 01 23:52:46 2009] [error] Init: Private key not found  [Mon Jun 01 23:52:46 2009] [error] SSL Library Error: 218710120 error:0D094068:asn1 encoding routines:d2i_ASN1_SET:bad tag  [Mon Jun 01 23:52:46 2009] [error] SSL Library Error: 218529960 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag  [Mon Jun 01 23:52:46 2009] [error] SSL Library Error: 218595386 error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error  [Mon Jun 01 23:52:46 2009] [error] SSL Library Error: 218734605 error:0D09A00D:asn1 encoding routines:d2i_PrivateKey:ASN1 lib   I would really appreciate if some one can explain how to solve this. I have tried a few other tutorial website on self signed SSL certificates but none of the steps they mention are working.
98320
I want to edit the file contents in the 2nd row and 2nd column ,which is a file name from that I want to remove the part after the last underscore and before the file extension .  The contents of the file looks like below Input file contents   No|filename|count 01 |com_101_00000_0001_a234.txt|100   resultant file content  No|filename|count   01 |com_101_00000_0001.txt|100   The number of underscores may vary depending upon the file names present inside the .ctl files.there are multiple files in a folder likes this ,i want to change the contents for all .ctl file in the 2nd row similarly.  Operating system details Linux  2.6.32 -696.30.1.e16 GNU/linux
93487
How do I remove lines of a file (hosts) which contain  "adf.ly" string?
123314
I have one file like:  ID_SOUR_CALENDAR BIGINT NOT NULL DEFAULT 0  COMPRESS 0 , UNIQUE PRIMARY INDEX ( CALENDAR_DATE ); ID , ID_SOUR , PRIMARY INDEX ( CALENDAR_DATE );   I want to replace the ',' by ')' in the line just before the line containing PRIMARY.  The result should be:  ID_SOUR_CALENDAR BIGINT NOT NULL DEFAULT 0  COMPRESS 0 ) UNIQUE PRIMARY INDEX ( CALENDAR_DATE ); ID , ID_SOUR ) PRIMARY INDEX ( CALENDAR_DATE );
8318
I have a list like so.  blue-image1.jpg, blue-image2.jpg, blue-image3.jpg red-image1.jpg, red-image2.jpg, red-image3.jpg   It's was originally a csv format but I added newlines because they needed a prefix at first. Now I need to put them together again so it becomes like this.  blue-image1.jpg,blue-image2.jpg,blue-image3.jpg red-image1.jpg,red-image2.jpg,red-image3.jpg   I tried cat list.txt | tr ',\n' ',' and cat list.txt | sed 's/,\n/,/g'  but neither seem to work properly.
100037
I have a file named .ignore. In need to replace the projdir. For example:  ignore \..* ignore README projdir Snake   I need to replace Snake with, for example, "PacMan". I read the man page, but I have no idea what to do.
97970
I have file like this called a.txt:  [2016-03-30T04:51:51.599-04:00]!ER_DEV!Port_Conflict!/u05/app/ [2016-01-20T04:30:21.885-04:00]!ER_DEV!Port_Conflict!/u05/app/   I need to modify it so it looks like:    2016-03-30 04:51:51!ER_DEV!Port_Conflict!/u05/app/   2016-01-20 04:30:21!ER_DEV!Port_Conflict!/u05/app/   i already wrote a command to change [2016-03-30T04:51:51.599-04:00] to 2016-03-30 04:51:51 .but how to append the query output to original file.    awk -F'!' '{print $1}' a.txt | awk -F '[T.]' '{print $1 " " $2}' | awk '{gsub(/\[/,"")}1'
90052
I have multiple files named like that : screenshot 13:25.png Windows struggle to open these files probably because of the ":".  How can I replace it?
15794
My problem is that there exists an overlap between the symbol to introduce and the section title; it is manifest with two \heartsuits  \documentclass{article} \usepackage{tocloft} \usepackage{lipsum} %\contentslabel{3em}   \renewcommand\tableofcontents{% \section*{\contentsname\@mkboth{}{}}% \thispagestyle{empty}% %\small% \@starttoc{toc}% \thispagestyle{empty}% \clearpage% } \makeatother    \makeatletter \renewcommand{\@dotsep}{2} %%\renewcommand{\cftdot}{\ensuremath{\ast}} \renewcommand{\cftpnumalign}{r} %\renewcommand{\cftsecpresnum}{SOMETHING } \renewcommand{\cftsecfont}{\bfseries} \renewcommand{\cftsecleader}{\bfseries\cftdotfill{\cftsecdotsep}} \renewcommand{\cftsecpagefont}{\bfseries} %\renewcommand{\cftsecpresnum}{SOMETHING } \renewcommand{\cftsecaftersnum}{$\heartsuit$}     \renewcommand{\cftsecaftersnumb}{$\heartsuit$}     %\renewcommand{\cftsecaftersnumb}{\\} %   \newlength{\mylen} % a "scratch" length %   \settowidth{\mylen}{\bfseries\cftsecpresnum\cftsecaftersnum} % extra space %   \addtolength{\cftsecnumwidth}{\mylen} % add the extra space     %\makeatother   \begin{document} \tableofcontents  \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11] \section{1}\lipsum[4-11]  \end{document}   The modifying commands come straight from the manual of tocloft.  My goal is to have {the section number}\heartsuit{the section title} with no space in-between the characters.  I think the solution is to make the section numbers ragged on the right, just like all the page numbers are. The package does not seem to offer a manner to control the box controlling the section number. Is this possible with titletoc? (its readme is very succinct and I do not understand half of what is written)  EDITion:  @Werner: I have a snag with the code. I want to use the same pattern for the subsections and subsubsections as the one of the sections. So I use  \renewcommand{\cftsecaftersnum}{$\bullet$} %\renewcommand{\cftsecnumwidth}{2em}  \renewcommand{\cftsubsecaftersnum}{$\bullet$} %\renewcommand{\cftsubsecnumwidth}{0em}  \renewcommand{\cftsubsubsecaftersnum}{$\bullet$} \renewcommand{\numberline}[1]{\makebox[\@tempdima][r]{\@cftbsnum #1\@cftasnum}\@cftasnumb}    but the beginnings of the subsections and subsubsections is not adequate: (I use roman numbers for my sections and sub(sub)sections) Ideally, the number subsection (and subsubsection) must be aglin with the first letter of the sections it belongs to  so  II$\bullet$Title            II.1$\bullet$subtitle                         II.1.1$\bullet$subtitle   But it is not the case with the above code.
102146
I have the current libvirt 1.2.20 i want to pass to my machine create with virt-manager some qemu flags. I edited the file and add    &lt;/devices&gt;   &lt;qemu:commandline&gt;           &lt;qemu:arg value='-L pc-bios'/&gt;   &lt;/qemu:commandline&gt; &lt;/domain&gt;   But doesn't work i also tried to edit from virsh  virsh edit domain   and put   &lt;qemu:commandline&gt;           &lt;qemu:arg value='-L pc-bios'/&gt;   &lt;/qemu:commandline&gt;   But give me this error  errore: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/domain.rng Element domain has extra content: qemu:commandline  Failed. Try again? [y,n,i,f,?]:    How to pass correctly qemu command line? Thanks
111525
I have a filename in a format like:     system-source-yyyymmdd.dat   I'd like to be able to parse out the different bits of the filename using the "-" as a delimiter.
73209
This question is somewhat related to .  Before making the request via LWP::Simple I have a hash of query string components that I need to serialize/escape. What's the best way to encode the query string? It should take into account spaces and all the characters that need to be escaped in valid URIs. I figure it's probably in an existing package, but I'm not sure how to go about finding it.  use LWP::Simple; my $base_uri = 'http://example.com/rest_api/'; my %query_hash = (spam =&gt; 'eggs', foo =&gt; 'bar baz'); my $query_string = urlencode(query_hash); # Part in question. my $query_uri = "$base_uri?$query_string"; # http://example.com/rest_api/?spam=eggs&amp;foo=bar+baz $contents = get($query_uri);
113681
We want to implement a workflow that includes having YAML configuration files where we wish to change some of the contents before actually using them, and we are looking for a good command line tool to do this.  This can be as simple as setting a target-specific value (like an URL) in an existing node, but preferably would be able to add or modify whole blocks of the YAML file.  In a perfect world I would like something as powerful as the axis in XSLT.  We will use this with Maven in Docker files, where we have a preference for Debian based images, but not a strict requirement.
110012
the text in file looks like this:  [homes]         comment = Home Directories         path =          browseable =          writable = yes         valid users = %S         valid users = MYDOMAIN\%S  [printers]         comment = All Printers         path = /var/spool/samba         browseable = no         guest ok = no         writable = no         printable = yes   i want output as:  [homes]         comment = Home Directories         path = /data         browseable = yes         writable = yes         valid users = %S         valid users = MYDOMAIN\%S  [printers]         comment = All Printers         path = /var/spool/samba         browseable = no         guest ok = no         writable = no         printable = yes   i am using this command:  sed -i "\#path# s#.*#&amp; /data#" file   but it makes changes to everywhere in file where path is located  can anyone help me with this?
28512
I'm trying to set an RSA key as an environment variable which, as a text file, contains newline characters.  Whenever I attempt to read from the file and pass it into an environment variable, it will just stop at the newline character on the first line. How can I prevent this?
19267
As in  I'm trying to get line numbers which contains the pattern. My pattern contains slashes so I wanted to add custom delimiter.  This simple one works:  sed -n '/file/=' temp.txt   Using delimiter for string replace works too:  sed 's|file|gile|' temp.txt   but when I want to add delimiter to first example it doesn't:  sed -n '|file /etc|=' temp.txt   I know I can escape slashes but I would prefer to add custom delimiter. Any idea how to fix my command?