Search Results

Search: Posts Made By: jim mcnamara
588
Posted By jim mcnamara
ssh calls stty to do things like turn off/on...
ssh calls stty to do things like turn off/on echo. When the terminal stdin device is not what ssh expected you get the stty error. Try simply executing the ssh command making sure it can use the...
454
Posted By jim mcnamara
Try export run=$1 to make the variable visible...
Try export run=$1 to make the variable visible in child processes. I can't see a mistake in the syntax.
493
Posted By jim mcnamara
Paul Hsieh's square root page has a bunch of...
Paul Hsieh's square root page has a bunch of square root algorithms including using Newton's method:

Paul Hsieh's Square Root page (http://www.azillionmonkeys.com/qed/sqroot.html)

I used to...
382
Posted By jim mcnamara
The command connects to a remote server, does and...
The command connects to a remote server, does and ls -l of a directory, which list files in the directory on the remote machine. The command is between the tic characters '

The output of the...
Forum: What is on Your Mind? 2 Weeks Ago
657
Posted By jim mcnamara
This is great. Welcome back and...
This is great.

Welcome back and congratulations.
138
Posted By jim mcnamara
So removing "g" would then only replace the first...
So removing "g" would then only replace the first occurrence.
695
Posted By jim mcnamara
TRy waiting: while [[ $i -le 3 ]] do ...
TRy waiting:

while [[ $i -le 3 ]]
do
while read in_module
do
print $in_module
size=`ssh ${server[$i]} ls -l $in_module 2>/dev/null | awk '{print $5}'`
wait
...
718
Posted By jim mcnamara
The content of the file list, i.e., filenames,...
The content of the file list, i.e., filenames, has no associated filesystem metadata for any of the files named in your text file. You would have use the stat command on each one of the filenames in...
840
Posted By jim mcnamara
Try this: awk ' $4 != "root" { print $1 " "...
Try this:

awk ' $4 != "root" { print $1 " " $4 " " $5}
{next} ' ls_test
server10: njs nodeadm


The default for awk is to print what it reads in.
bash shell...
789
Posted By jim mcnamara
The process user running the command must be the...
The process user running the command must be the user of the process id 3104 (in your example).
What problem are you trying to solve? Please give us your UNIX type.

As a side note kill -9 is...
849
Posted By jim mcnamara
Corrected version awk -F "[/ \-]" '{ ...
Corrected version
awk -F "[/ \-]" '{
tmp=$(14)
gsub("[A-Z]{2}_[0-9]{4}_", "", tmp)
printf("%s %s-%s\n", $1, tmp, substr( $(15),1,...
849
Posted By jim mcnamara
This example is wrong, thanks Rudi See two posts...
This example is wrong, thanks Rudi See two posts down for a revised version, tried to use REGEX to simplify the code, does not accomplish much.
Using the sample
this code
awk -F "[/ \-]" '{
...
Forum: Shell Programming and Scripting 4 Weeks Ago
913
Posted By jim mcnamara
Your code as posted will not work at all. ...
Your code as posted will not work at all.

grep -A3 'pattern goes here' filename
Is the correct syntax.

Correct the order of elements in your command first. And then let's go from there. ...
Forum: Programming 4 Weeks Ago
1,312
Posted By jim mcnamara
My understanding is the operation of the two are...
My understanding is the operation of the two are different:

Documentation -


Try getting get rid of the shlex,
subprocess.check_output( [ "command" "parameter_1" ])
1,077
Posted By jim mcnamara
If the file names are the basis of comparison: ...
If the file names are the basis of comparison:

diff -r dir1 dir2 | grep dir1 | awk '{print $4}' > ~/mydiff

diff -r does a recursive comparison of directories and their subdirectories
306
Posted By jim mcnamara
Are the files, like a.log, always 100 lines? ...
Are the files, like a.log, always 100 lines?
Have you tried anything yet, like using the wc command to find the number of lines in a file? Please show us so we can help.
1,017
Posted By jim mcnamara
Suggestions: next time, be sure to tell us your...
Suggestions: next time, be sure to tell us your OS and your shell, you will get better answers.
There is a command available from GNU called parallel which does exactly what you want. Also ...
Forum: What is on Your Mind? 09-07-2019
1,345
Posted By jim mcnamara
Hey! This is great. Welcome to the team. ...
Hey! This is great. Welcome to the team.


- jim
992
Posted By jim mcnamara
It seems to be an SSL problem. I think the...
It seems to be an SSL problem. I think the current version of Openssl is 1.0.2. What version do you have?

openssl version will tell you. Please tell us what you find, as well as your Linux...
906
Posted By jim mcnamara
Can you please define what you mean = when I...
Can you please define what you mean =
when I send from another foreign box (can I assume it has network access and IRC software?)

That is another way of phrasing part of your question. In...
122
Posted By jim mcnamara
Also note that I do not see any difference...
Also note that I do not see any difference between your input and output examples. It is hard to help without an idea of what your tried. It also is extremely helpful for good answers to include...
1,298
Posted By jim mcnamara
By "append" your mean change the subject line - I...
By "append" your mean change the subject line - I think.
Let's tidy up the "script":

# Assume failure
code="FAIL"
# silently check the input file, if okay change the code
grep -q 'Return code...
1,034
Posted By jim mcnamara
There are two basic approaches - one for linux, ...
There are two basic approaches - one for linux, another for non-linux. So which one do you have? Shell would be helpful, too.
154
Posted By jim mcnamara
The space character is the concatenation operator...
The space character is the concatenation operator in awk


$ echo "333" | awk '{ $0="space in front " $0 "no space after"; print $0}'
space in front 333no space after
Forum: Cybersecurity 08-24-2019
742
Posted By jim mcnamara
Implementing security personnel practices to prevent future infections
Pure opinion on my part:
The hackers who wrote the exploit have more than probably put it in all kinds of places. You miss one hiding place and your machine is still subject to disruption. You...
Showing results 1 to 25 of 500

 

Featured Tech Videos

All times are GMT -4. The time now is 02:02 AM.
Unix & Linux Forums Content Copyright 1993-2019. All Rights Reserved.
Privacy Policy