All Questions
Tagged with perl command-line
32
questions
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 ...
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 ...
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 ...
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 ...
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 _ ...
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 ...
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 ...
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::...
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 ...
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.(...
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 ...
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 ...
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 ...
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....
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 ...