Skip to main content

All Questions

Tagged with
0 votes
1 answer
424 views

Add line number at the end of each line in a text file

I have a text file which contains thousands of lines with same links. I want append the line number at the end of each line. For example; https://example.com/ https://example.com/ these links would ...
Denied Access's user avatar
2 votes
2 answers
126 views

Find and delete near duplicate lines with certain punctuation

I have a text file with millions of lines. Some lines contain the same alphanumeric sequence, but differ in case and punctuation. I consider these lines duplicates. I want to remove any duplicate line ...
Priora's user avatar
  • 35
0 votes
1 answer
546 views

500 Internal Server Error when run perl file and no access to command line

I'm a newbie with Perl. I've created a simple file test.pl with the code: #!/usr/bin/perl print 'test'; uploaded it to my shared hosting with Linux where PERL is enabled and changed my PERL file ...
sprsr's user avatar
  • 269
0 votes
1 answer
337 views

Combining two txt files containing name and last name on command line

I have two text files. First file have 20 Names listed in seperate lines and 2nd file have 20 surnames listed in seperated lines. How I can combine those files. So final text file have both first name ...
Roxion's user avatar
  • 354
1 vote
2 answers
996 views

Regex to substitute character with numbers around it in filenames with rename utility (perl based)

I would like to rename files that have the following format: somethingblabla15T06:58_31+0000somethingblabla.bla THe new name should be somethingblabla15T06:58:31+0000somethingblabla.bla So the _ ...
linux_user_11880's user avatar
2 votes
0 answers
220 views

Python and Perl not recognized in cmd even after adding in environment

It was fine yesterday, but it suddenly stopped working today. Both my perl and python were not recognized in cmd. I read as much as i can online for the answers and follow the instruction. I have ...
niknur's user avatar
  • 21
4 votes
4 answers
2k views

What are the ways to replace a fixed string (not regex) as a whole word in command line on Linux?

What are the ways to replace a fixed string (not regex) as a whole word in command line on Linux? For example I would like to replace literal "b.*c" as a whole word, with literal "\t", without ...
vstepaniuk's user avatar
0 votes
1 answer
138 views

Unable to access config'd custom xmp namespace in exiftool

Though some form of me just not really getting it, I am unable to write this custom XMP namespace I've made in my config file. Below is the file. %Image::Exiftool::UserDefined = ( 'Image::ExifTool::...
Atlas Sullivan's user avatar
2 votes
1 answer
1k views

error: git-submodule died of signal 11 [closed]

FML edit: So..... long story short, it was a function I had in my bashrc profile... test() { npm run test $1 $2 $3 $4 ;}; export -f test But! How did I track this down, you might ask? Well, after ...
lopu's user avatar
  • 31
0 votes
0 answers
386 views

Perl script to batch equivalent

I created a PERL file, but as it's rather simpistic, seems a little 'overkill' to send people 16MB of PERL on a USB stick just to run one program, so wondering if a smaller DOS batch file could work.(...
Cristofayre's user avatar
0 votes
2 answers
1k views

Windows shortcut, Command Line and Perl

I developed several scripts using the command line in windows (which is needed because there are several 'say' comments that need to be shown) and using the line: perl "D:/path to script" That's all ...
Cristofayre's user avatar
0 votes
2 answers
1k views

Why is this Perl command failing on the Windows command line?

I am trying to replicate the Perl command from this answer on Ask Ubuntu in a Windows command line environment. I believe I have downloaded Perl for Windows and installed it correctly, so the error ...
Questioner's user avatar
3 votes
2 answers
284 views

To override the contents of files

I have two files, file1.txt and file2.txt, file1.txt is: perimeter a=10 perimeter b=15 perimeter c=20 file2.txt is: perimeter a=12 perimeter b=14 Let me know the sed or Perl to override the values ...
Python_geek's user avatar
2 votes
1 answer
755 views

Open batch file and execute commands from there

My intention is to run a perl script latexdiff.pl from a portable version of perl. There is a batch file portableshell.bat which sets up the environment for perl. If I open it and type perl latexdiff....
Zoltan Csati's user avatar
0 votes
1 answer
503 views

Execute Scripts Over Serial Connection Using Perl and cmd

I want to execute a script via a serial connection COM6 and have said script clear a switch without credentials. I can send the file but the script does not execute. Is there a specific command or ...
J Man's user avatar
  • 1

15 30 50 per page