Search Results

Search: Posts Made By: jim mcnamara
78
Posted By jim mcnamara
The tomcat base install should set protections...
The tomcat base install should set protections correctly on directory trees and objects it owns.

Apache Tomcat(R) - Welcome! (https://tomcat.apache.org/)
You can download tomcat and...
Forum: Programming 4 Days Ago
267
Posted By jim mcnamara
The problem relates to memory management. The OS...
The problem relates to memory management. The OS sets an "end point" and a "start point" for a process working set (memory) when the process begins.

There are flavors of the malloc (also realloc)...
292
Posted By jim mcnamara
Your turn next: I got your awk code to run...
Your turn next:
I got your awk code to run against a dummy input file. I cannot see why your sample ran for you - however after fixing syntax I got an awk source file t.awk. t.lis is the file...
477
Posted By jim mcnamara
Plus, bash creates a subprocess (different from...
Plus, bash creates a subprocess (different from ksh) on the right side of a pipe, meaning any changes to variables in the statement on the right are not returned to the parent. This changed with...
Forum: Shell Programming and Scripting 2 Weeks Ago
127
Posted By jim mcnamara
what does ls -l sendmail.cf show? Has it...
what does ls -l sendmail.cf show? Has it changed recently? There should a default version of sendmail.mc you can compile and then substitute. If in doubt.

If it got changed you may want to...
Forum: Shell Programming and Scripting 3 Weeks Ago
618
Posted By jim mcnamara
Try using shell continuation "markers " the...
Try using shell continuation "markers " the backslash \ Also added { }

for f in $(find . -type f -name '*.mkv');
do
ffmpeg -n -y -i "${f}" -vf scale=720:-2 -c:v mpeg4 -vtag xvid -b:v 969k...
663
Posted By jim mcnamara
Here documents work for this situation, example...
Here documents work for this situation, example with ssh keys set up :


ssh somewhere << EOF
ls some_folder;
cd ./some_folder
./do_some_action.sh 'some params'
pwd
./do_...
2
113
Posted By jim mcnamara
Thanks for the solution.
Thanks for the solution.
439
Posted By jim mcnamara
What does this command show: find /usr/lib/...
What does this command show:

find /usr/lib/ -type f -name 'libXm*'

If you find no files, then you need to install Xwindows (and Motif because X is written using Motif )

Get back to us if...
Forum: Shell Programming and Scripting 3 Weeks Ago
878
Posted By jim mcnamara
Use bc if (( $(echo "$num1 > $num2" |bc -l)...
Use bc

if (( $(echo "$num1 > $num2" |bc -l) )); then
echo "ok"
fi


bc does floating point comparisons, in bash you have to surround it with (( )) to get a boolean (true/false) result.
Forum: Shell Programming and Scripting 4 Weeks Ago
1,515
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...
762
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.
1,342
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...
703
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? 10-05-2019
1,362
Posted By jim mcnamara
This is great. Welcome back and...
This is great.

Welcome back and congratulations.
153
Posted By jim mcnamara
So removing "g" would then only replace the first...
So removing "g" would then only replace the first occurrence.
845
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
...
869
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...
1,578
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...
914
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...
1,015
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,...
1,015
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 "[/ \-]" '{
...
1,579
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 09-18-2019
2,059
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,742
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
Showing results 1 to 25 of 500

 

Featured Tech Videos

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