VideoHelp Forum
+ Reply to Thread
Results 1 to 17 of 17
Thread
  1. Hi, I'm a cat. Yes is true, a cat

    please consider that I have a .avs file that

    contain, for example,


    Code:
    vid=LSMASHVideoSource("V:\osmoRiccione\mxf\IMX\concatHD.mov").crop(0,32,0,0).IResize(1920,1080).colorMatrix(mode="Rec.601->Rec.709")
    simply with a batch procedure I need to remove
    Code:
    .colorMatrix(mode="Rec.601->Rec.709")
    Consider that the there are present double quotes inside the mode="Rec.601->Rec.709"

    How I can do?
    Quote Quote  
  2. I use EditPadPro to edit multiple text files simultaneously. You can open 100 AVS scripts at once and do a Find Replace operation in a few clicks.
    Last edited by Aludin; 4th Aug 2019 at 09:16. Reason: what am i smoking
    Quote Quote  
  3. Member
    Join Date
    Jul 2009
    Location
    United States
    Search Comp PM
    You can do it with powershell, see https://blogs.msdn.microsoft.com/zainnab/2007/07/08/grep-and-sed-with-powershell/, or find an implementation of SED for windows, or Windows Subsystem for Linux.
    Quote Quote  
  4. I have an old version of sed for Windows that can do it with:

    Code:
    g:\utils\sed s/".colorMatrix(mode=\"Rec.601-^>Rec.709\")"// input.txt >output.txt
    Quote Quote  
  5. Image
    [Attachment 49740 - Click to enlarge]


    Code:
    IF NOT "%dvcamOrIMX%"=="1" v:\sed.exe  s/".colorMatrix(mode=\"Rec.601-^>Rec.709\")"// "%cd%\avsInput.avs">"%cd%\avsInputMod.avs"
    sed works thanks
    Quote Quote  
  6. By the way, sed can modify the original file directly if you use the -i switch

    Code:
    sed -i s/text_to_replace/replacment_text/ filename.txt
    Quote Quote  
  7. oh wowcat

    Code:
    IF NOT "%dvcamOrIMX%"=="1" v:\sed.exe -i s/".colorMatrix(mode=\"Rec.601-^>Rec.709\")"// "%cd%\avsInput.avs"
    Quote Quote  
  8. sed works but it generate some temporary files for example called sedM0g3Ot or sedfunTE that I don't want.
    Is there a way to tell to sed.exe to don't generate they?
    Quote Quote  
  9. Originally Posted by marcorocchini View Post
    sed works but it generate some temporary files for example called sedM0g3Ot or sedfunTE that I don't want.
    Is there a way to tell to sed.exe to don't generate they?
    Probably not. "In place" in your version of sed may mean it creates its own temporary file with the new text, deletes the original file, then renames the temporary file with the original name. The version I have doesn't seem to do that but I haven't tested it with a really long file where it would be noticeable.
    Quote Quote  
  10. An half-solution:

    in the clean-up routine I putted

    Code:
    if exist sed*.* del sed*.*
    Quote Quote  
  11. Hi, I'm a cat. Yes is true, a cat
    To quote “Cornucopia” from two years ago :
    Not averse to helping, but until you wake up and upgrade, and until you get over your fixation with felines, this is the only kind of comment you'll get from me.
    Quote Quote  
  12. The "cat" thing is so juvenile and stupid. I could help him with his many requests, but refuse to do so because of this. I too asked him to stop, but he thinks he is being "cute" and won't stop.
    Quote Quote  
  13. He should switch to "I'm a hot chick."
    Quote Quote  
  14. Originally Posted by jagabo View Post
    He should switch to "I'm a hot chick."
    Great idea. Even better, "I'm a blonde hot chick." We stupid men can't resist that.
    Quote Quote  
  15. Originally Posted by johnmeyer View Post
    The "cat" thing is so juvenile and stupid. I could help him with his many requests, but refuse to do so because of this. I too asked him to stop, but he thinks he is being "cute" and won't stop.
    Yeh been there done that. Some time ago put him on my ignore list, now I don't have to see/read it.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!