Search Results

Search: Posts Made By: jim mcnamara
152
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...
175
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,...
175
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 "[/ \-]" '{
...
186
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 Days Ago
229
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" ])
317
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
276
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.
514
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? 2 Weeks Ago
599
Posted By jim mcnamara
Hey! This is great. Welcome to the team. ...
Hey! This is great. Welcome to the team.


- jim
527
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...
496
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...
112
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...
634
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...
734
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.
136
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 4 Weeks Ago
640
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...
792
Posted By jim mcnamara
If you have a process that generates repeated...
If you have a process that generates repeated core dumps, you have a problem. On production systems you want to see no core dumps.

A process that dumps core may leave a data set in an...
751
Posted By jim mcnamara
Running find against / (root) is not great idea. ...
Running find against / (root) is not great idea.

Run your code as a non-privleged user.

Try
find / -type f -name '*.sh' -exec grep -l 'vijay@gmail.com' {} \; > ~/mylist
then check the list....
Forum: Shell Programming and Scripting 4 Weeks Ago
990
Posted By jim mcnamara
echo junkword | truss iconv -f UTF-8 -t...
echo junkword | truss iconv -f UTF-8 -t ASCII//TRANSLIT 2>&1|grep Err

Every missing file will show up with ENOENT as the last word. Where you get the files you need, I do not know. An AIX...
Forum: Shell Programming and Scripting 4 Weeks Ago
990
Posted By jim mcnamara
That looks like you may possibly be running on...
That looks like you may possibly be running on AIX, please give us your UNIX OS and shell.

The error means iconv cannot find the language file it needs to make the conversion. Finding what...
Forum: What is on Your Mind? 4 Weeks Ago
1,147
Posted By jim mcnamara
Peasant, Congratulations. You have many...
Peasant,

Congratulations. You have many good posts to your credit. We appreciate your help.

Best,

Jim M
1,043
Posted By jim mcnamara
Then your example was misleading me. Any time...
Then your example was misleading me. Any time I see complexity like you describe, it makes me wonder about the analysis performed. Should be looked at. But when we get fractional part of it, we...
1,043
Posted By jim mcnamara
Hmm. Assuming the file looks like your example -...
Hmm. Assuming the file looks like your example -
FWIW you can do this many ways, you may be over thinking your task.
Example:

greek=$(grep -c "[Gg]reek$" infile)
latin=$(grep -c "[Ll]atin$"...
1,043
Posted By jim mcnamara
Do you need distinct awk functions for every line...
Do you need distinct awk functions for every line of text or just a few functions? Sample input, output would help a lot.

Edit: I don't understand the request either....
1,041
Posted By jim mcnamara
Your script as originally posted showed a shebang...
Your script as originally posted showed a shebang for ksh.
Here is what I get:

$ cat t.shl
#!/bin/bash

if [ -z "$BASH_VERSION" ]
then
echo hi
else
echo "characters found"
fi
...
Showing results 1 to 25 of 500

 

Featured Tech Videos

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