Search Results

Search: Posts Made By: netatma
1,587
Posted By RudiC
Love to - if you tell me how you supposed it to...
Love to - if you tell me how you supposed it to work and what it really did.

---------- Post updated at 20:44 ---------- Previous update was at 20:43 ----------

... optimally backed by sample...
1,587
Posted By Aia
That would delete any lines, regardless of how...
That would delete any lines, regardless of how long, that contains the string insset in its content, and it would do it in the input file. Since <?php is part of that line it will disappear.
The...
1,587
Posted By RudiC
You may want to share your sed script to identify...
You may want to share your sed script to identify where the <?php lead in was removed.

A sed solution for your problem:sed '1 {/<?php/b;s/^/<?php/}' file >TMP && mv TMP file
1,587
Posted By Aia
Please, try: perl -i -npe '$_="<?php\n$_" if $....
Please, try:
perl -i -npe '$_="<?php\n$_" if $. == 1 and not /^<\?php/; $.=0 if eof' *.php

It will convert a php file content from this:

echo readfile("webdictionary.txt");
?>
to this:...
Showing results 1 to 4 of 4

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