Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
3 votes
1 answer
83 views

I wanted to execute the below command. I have a file with server names. for i in \`cat /tmp/srv_list\`; do ssh $i "uname -a; uptime; grep -E "warn|error|failed|issues" /var/log/...
Uday's user avatar
  • 33
1 vote
1 answer
120 views

I am using the following code to start putty according to the current COM name: powershell -Command "$COMPORT=(Get-WmiObject Win32_SerialPort | Select-Object Name, DeviceID | Where-Object { $_....
0 votes
1 answer
123 views

OK, so this is more a code "optimization" exercise. I have to move all elements from a python dictionary to another, under certain condition, while emptying the source dict at the same time. ...
0 votes
0 answers
69 views

I'm setting an alias for projectMSDL in bashrc. The arguments to tune it aren't the problem. It does work, but I want to add a renice to tune it a little more. I ultimately want to run two instances, ...
-5 votes
2 answers
102 views

I attempted to create a one-liner to print out this ("the non-perfect list of safe characters for filenames, in most operating systems"): $ python ./z.py +,-. 0123456789 @...
0 votes
1 answer
117 views

A very popular question here on SO is: How do I check out a remote Git branch? but the answers there either assume the branch-of-interest is already fetched, or suggest that we git fetch first. My ...
0 votes
0 answers
56 views

In the command below, I want to be able to make the regex pattern in the perl process an stdin instead, and turn that into an alias, and maybe the filename at the end to, I use this line a lot to find ...
1 vote
1 answer
83 views

I recently started coding in Julia (coming from Python). To practice my Julia skills, I started solving Euler problems. Euler problem 12 (https://projecteuler.net/problem=12) is not so hard to solve. ...
René's user avatar
  • 4,919
0 votes
3 answers
84 views

In bash, how to one-line concatenate files into cin turned as argument to an executable? Basically, I have this: >> cat file.cpp #include <iostream> #include <string> int main(){ ...
fghoussen's user avatar
  • 599
0 votes
1 answer
80 views

I have a tab-separated file like this: test test2 test3 test4 I want to read each line, store the first field in $a and 2nd in $b using a shell or Perl one liner. Because then I need to ...
1 vote
2 answers
262 views

From my understanding, it is possible to convert any bash script into a single line by inserting semi-colons at the end of each line of code and removing the new-line. Firstly - am I correct in this ...
0 votes
1 answer
27 views

You measure the time dependence of a certain value 10 times by selecting 100 time values, as a result you get an array of 10x100. Simulate it with random values: arr = np.random.random((100, 10)) ...
0 votes
1 answer
95 views

Is there a perl one-liner to change ":" to "/" and "/" to ":" in every line of a file. for example: fffc002/fffc002:9090 fffc003/fffc003:9090 fffc004/fffc004:...
0 votes
1 answer
624 views

I have a dictionary whose values are matrices. I want to invert these matrices but some of them are singular, hence I get thrown the Singular matrix error when running the program. Here is a minimum ...
haricash's user avatar
0 votes
1 answer
56 views

Why do I need a temporary variable as personAgentComparator needed here and to call reversed() on that? public class SubTypeComparatorIssue { public void sortAgeFromOldToYoung(List<Person> ...

15 30 50 per page
1
2 3 4 5
...
12

AltStyle によって変換されたページ (->オリジナル) /