All Questions
76
questions
-1
votes
3
answers
90
views
Delete 2-line paragraphs, keep 3-line paragraphs, maintain newline between all
On a Linux machine with GNU tools I have an ascii file that consists of only 2-line and 3-line paragraphs, each paragraph separated by a newline. All 2-line paragraphs are to be deleted so that all 3-...
2
votes
3
answers
821
views
ARGV[] not accepting the argument
I have a shell script that I am trying to pass a date argument to ARGV[1] but the script is giving a blank output
Here is the command:
#!/bin/bash
dt=$(date -d "yesterday" '+%m%d%Y')
cat /...
0
votes
1
answer
535
views
Check if two IP addresses are in a range
Using bash or perl on a minimal installed Linux, I am trying to validate two IP addresses if there are in a range.
I came across a bash script that works well, but the fact that it prints all the IP ...
0
votes
1
answer
204
views
How can I create a .txt file containing data being generated in real-time in Linux terminal when a program is running?
I am running an AutoDock Vina program (using a Perl script) in Linux.
It generates lots of important data
(regarding binding free energy of protein-ligand docked complexes).
However, I cannot save ...
0
votes
1
answer
108
views
clusterssh: prevent windows being arranged alphabetically
I am using cssh on Debian 10 (package clusterssh 4.13.2-2).
when I connect to multiple servers:
cssh foo bar zz aa
cssh will open 4 terminals and ORDERS THEM ALPHABETICALLY !!!
So that I get the ...
-1
votes
1
answer
258
views
write bash code loop a file line by line that have values, first word as a row and create csv [closed]
i have this sample data
dn; uid=456456456,cn=users,dc=efsfb,dc=org,dc=co;
objectclass; top;
objectclass; person;
objectclass; organizationalPerson;
objectclass; inetOrgPerson;
uid; 456456456;
...
-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 ...
2
votes
3
answers
8k
views
string interpolation preserving quotes in bash
I have to format body of a json that gets some values substituted from user environment variables. Trying to find a way via shopt or something so the json string is substituted correctly in bash ...
2
votes
2
answers
119
views
Perl command Performance issue
I've used the following command to remove special characters in number columns (.CSV file) and it is working fine as excepted but the issue here is performance. My CSV file number column data contains ...
0
votes
1
answer
2k
views
Terminal warning or error
Every time i open up a terminal i do get the following message on the terminal
Can't locate local/lib.pm in @INC (you may need to install the local::lib module) (@INC contains: /home/punit/perl5/lib/...
0
votes
2
answers
776
views
Convert a textual representation of a float to actual numeral using command line
I have a double printed as text. Is there a way to pass that source text number to some utility in order to get the actual numeral i.e. the nearest actual representable double value? Either in decimal/...
2
votes
5
answers
675
views
Perl multiple line data between two patterns into one line output
File1
pure info: myjob-relaed_rawmaterila
Timings: Full
pure info: Check-platform-Log-90Days
Timings: Full
Timings: Incremental
pure info: ...
1
vote
3
answers
2k
views
Grep string inside double quotes & single quotes
I want to find the string inside double quotes or single quotes in a text file(the text file is multiline),
for example:
I have a
test "foo bar1" test2 "foo\"bar2",
"...
-2
votes
2
answers
533
views
one line shell to output all combinations of letters in a word [closed]
I have a word like:
fath
output all combinations of letters in a word like:
f
fa
fat
fath
ft
fth
fh
1
vote
2
answers
95
views
Creating break lines before desired line length keeping chunk prefix
I want to break lines of code (adding #') when they make part of chunk (line begins with #' (#\x27)), when exceeding 100 cols.
My solution does not work for several chunks:
Example file:
#' chunk ...