All Questions
176
questions
0
votes
1
answer
44
views
version `XCRYPT_2.0' not found after Update Debian 10 to Debian 12
I was instructed to upgrade Debian 10 to Debian 12. After the upgrade, I noticed that the ssh.service was not working. Now I found out that no 'apt' commands work. I can't install anything.
Here the ...
16
votes
5
answers
1k
views
How can UserA programmatically replace a text string within a file they own that's located in /etc?
A non-root linux user owns a text file that's located in /etc, where the non-root linux user does not have permission to create files. The non-root linux user can edit the file manually via vi without ...
1
vote
1
answer
51
views
Report sed changes + corresponding perl syntax
Newbie learning Linux and perl:
I would like to (a) search-replace strings, (b) match filename pattern .myfile., (c) look recursively in subdirectories, and (d) print the line number, file name, ...
-2
votes
3
answers
120
views
bash + how to verify folders under specific path are ended with number/s
I want to check the folder/s under /var/kafka that all them are ended with number otherwhile I will exit with error
ls -ltr /var/kafka
drwxr-xr-x 399 kafka kafka 28672 Nov 9 13:10 data6
drwxr-xr-x ...
2
votes
0
answers
100
views
Processing large blocklists with GNU Parallel
This is an ongoing project that has undergone a major update to speed up list processing. Here is the homepage for anyone interested!
It processes lists defined in lists.json by transforming the list ...
0
votes
2
answers
525
views
Remove multiple occurrences using SED command
We had a requirement to remove all /t characters that are not followed by quotes
sed 's/\\t\([^"]\)/foo\1/g'
this command worked good for single occurrence. What option do we need to add remove ...
1
vote
1
answer
47
views
"Total In-/Out- coming connection awareness" - script?
once I had found a bash (or Perl maybe; it's so long ago, that I wasn't knowledgeable about bash enough to tell one set of hieroglyphs from another set so to speak) script that filtered the open files ...
1
vote
1
answer
747
views
Perl @INC Path Help
I got handed over a Perl script which fails to run because the path to the Perl is deleted.
How can I modify the path such that I can point it to /opt/perl/lib/5.28.2
Any help will really be ...
3
votes
4
answers
584
views
sed + add string on the beginning of line but ignore if already exist [duplicate]
here is example how to add string on the beginning of line when match the UUID number in fstab
sed -e "/UUID=953b1921-ac73-4b7b-abaf-ff983b0fce8a/ s/^/###FAULTY_DISK###/" -i /etc/fstab
and ...
0
votes
0
answers
32
views
Read List of URLs to obtain informations
Can you complete this Perl/bash script for a url and for a list of urls and tell me how to write several regex in the same script?
wget -Otest.html https://www.cormes.de/impressum
perl -nE '...
3
votes
1
answer
117
views
Best way to remove and replace different characters from multiple filenames?
I have several folders full of files with the following format:
Show Name - 07x09 - Episode Title.mp4
What I'm trying to do is rename them to the following format:
Show.Name.S07E09.Episode.Title.mp4
...
3
votes
2
answers
1k
views
Find a pattern (of a child tag) and replace the entire parent tag at XML files, without using sed tool [duplicate]
Is there a way to find a pattern (of a child tag)
and replace the entire parent tag, using regular expressions?
I'm working from a Linux server without a graphics environment.
I have XML like:
<?...
-1
votes
1
answer
1k
views
sh + how to send cntrl c and then enter yes to accept license
I need to enter CNTRL C and then I need to enter yes , in order to accept license
now I am thinking how to automate this process
can we automate this process as run the sh script and entering CNTRL C ...
0
votes
1
answer
54
views
Weird ptp-bin directory
In my home directory the ptp-bin/ appeared.
It contains one file ptp with the following content:
#!/usr/bin/perl
require("File/Spec.pm");my@files=();my$aflag=0;my$type=undef;for$a(@ARGV){if($...
0
votes
4
answers
50
views
Replace TAGS in FileB with VALUE from FileA
I am looking for some assistance in perl, please. I have most of the code built, but I am finding one part particularly challenging.
If FileA:
tag1=value1
tag2=value2
and FileB:
value1=<tag1>
...