Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5932675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:52:01+00:00 2026-05-22T14:52:01+00:00

I have a problem with my regex: My script is written in perl. #!/usr/bin/perl

  • 0

I have a problem with my regex:

My script is written in perl.

#!/usr/bin/perl

# Inverse les colonnes 1 et 2
while(<>){
    my @cols  = split (/\|/);
    print "$cols[-3]/$cols[-4]\n";
}

exit;

I create an alias using the command :

alias inverseur="perl /laboratoire10/inverseur_colonnes.pl

I am hoping to accomplish the following:

Write a “bash” script that creates a file container for each movie title (.avi) in the file.

The original file is: http://www.genxvideo.com/genxinventory-current.xls
but I have since renamed it to liste_films.csv .

All quotation marks, spaces, dashes, and other strange characters must be replaced by an underscore, “_”.

The group would become the directory name and the title of the movie will follow the file name suffix( .avi). In order to do this, the code must process the fields “title” and “class” in reverse. You can reverse the fields “title” and “class” with the alias “inverter” created earlier.

The script will obviously create each directory in “/laboratoire10” before creating the .avi files. There should be 253 valid directories total. Directories are being created through a “|” with the command “xargs mkdir-pv /.”

I need help augmenting my current code with a command to find .avi files whose name contains the string min/maj “wood

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T14:52:02+00:00Added an answer on May 22, 2026 at 2:52 pm

    It is very hard to understand what exactly you are trying to do. Under the assumption you have a | separated CSV and wish to have a directory tree with CATEGORY/TITLE and the file named “cans.avi” under each directory with that name, here is a one liner perl script.

    perl -mText::CSV -e '$csv = Text::CSV->new({ sep_char=>"|",binary=>1,auto_diag => 1 } ) || die; open my $fh, "<", $ARGV[0] or die; while (my $row = $csv->getline($fh)) { $file = cleaner($row->[1])."/".cleaner($row->[0]); print "mkdir $file; touch $file/cans.avi\n"; } sub cleaner($) { my($f) = @_; $f =~ s/\W/_/g; $f;}'  ~/tmp/genxinventory-current.csv 
    

    I converted the XLS file to | separated CSV using libreoffice, so your conversion mileage (kilometerage?) may vary.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having perl regex matching problems with a network script I have, I've managed
While doing some small regex task I came upon this problem. I have a
i have a Perl script which tokenize a string @s=split /([^a-zA-Z \t\-\'\,\.]+)/, $_[0]; #
I have a problem finding a sed script that works when the regex looks
Possible Duplicate: Java - Regex problem I have list of URLs of types: http://www.example.com/pk/etc
I have written a python script (my very first) that accepts input of a
i have regex code: <script type=text/javascript> var str = kw-xr55und; var patt1 = /[T|EE|EJU].*D/i;
I have problem with one of my validation regex when using nonstandard utf-8 character.
Sorry, if this to verbose, but I have a perl script that is partly
I have problem with evaluation XPath expression in Windows Script Host using JScript when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.