Search Results

Search: Posts Made By: m.d.ludwig
19,237
Posted By m.d.ludwig
The if statement: is incorrect. It should...
The if statement:

is incorrect. It should have been:
if [[ $psup -gt 0 ]](without the trailing semicolon)

What you did was execute the command "1" (which was the value of the variable psup) in...
1,726
Posted By m.d.ludwig
This awk script will (almost) do what you need: ...
This awk script will (almost) do what you need:
BEGIN { FS = OFS = ","; }
NR == 1 { print; next; }
{ f = $1 FS $2 FS $3; if (m[f] < $4) { m[f] = $4; } }
END { for (f in m) { print f, m[f]; }...
1,559
Posted By m.d.ludwig
The range expression of awk The pattern1,...
The range expression of awk
The pattern1, pattern2 form of an expression is called a range pattern. It matches all input records starting with a record that matches pattern1, and continuing until...
4,818
Posted By m.d.ludwig
Hi there. You wrote: I made a poor...
Hi there.

You wrote:

I made a poor assumption that HP-UX 11 was more similar to a linux system, where find does have a -print0 option. But since you are running a system-V unix, you can use:...
4,818
Posted By m.d.ludwig
I have to admit some puzzlement from: This...
I have to admit some puzzlement from:

This will run grep on every file and directory found - one at a time. Also, the output of these greps is then piped to -exec, which I am pretty sure does not...
6,525
Posted By m.d.ludwig
I thought so as well, but the linux version of...
I thought so as well, but the linux version of find has path as an optional argument. A bit of a surprise to me.
1,265
Posted By m.d.ludwig
For this, I would use split: cat f1 f2 f3 ... |...
For this, I would use split:
cat f1 f2 f3 ... | split -b 1GB - merged.This will merge you files and generate 1GB files named merged.aa, merged.ab, merged.ac, etc. Each merged.xx file, except for...
6,525
Posted By m.d.ludwig
I am not sure why find is not passing in the path...
I am not sure why find is not passing in the path to the file. You can check what is being exec'ed with:
find -type f -name "*.mp3" -exec echo eyeD3 --add-image=cover.jpg:FRONT_COVER {} \;
Now if...
Forum: Programming 12-12-2011
10,181
Posted By m.d.ludwig
I do apologize, I skipped right over the 'XQuery'...
I do apologize, I skipped right over the 'XQuery' requirement.
1,897
Posted By m.d.ludwig
Since you are a self-professed "newbie", I will...
Since you are a self-professed "newbie", I will add commentary to the script.
#! /bin/bash

NAME=$(basename ${0})

declare -A extlist
...
Forum: Programming 12-12-2011
10,181
Posted By m.d.ludwig
There are several ways to do this: for a in...
There are several ways to do this:
for a in $(seq 1 10); do
echo $a
done
or
a=0
while [[ ${a} -le 10 ]]; do
a=$(expr ${a} + 1)
done
or
a=0
while [[ ${a} -le 10 ]]; do
(( a =...
1,366
Posted By m.d.ludwig
Have you tried something like: echo kill `ps...
Have you tried something like:
echo kill `ps -ef |grep test.sh| grep -v grep`to see what arguments you are passing to kill.
Or even sh -x badscript?

If I would have to guess ... you are running...
1,522
Posted By m.d.ludwig
Simply: ls Projects/S*/MP(assuming there is...
Simply:
ls Projects/S*/MP(assuming there is only S1, S2, ... S20 in Projects)

If there are others, then:
ls Projects/S{{,1}{1,2,3,4,5,6,7,8,9},{1,2}0}/MP(assuming bash or csh)
or even:
ls...
1,394
Posted By m.d.ludwig
If you can run su - dummy, run alias to get the...
If you can run su - dummy, run alias to get the list of aliases. If this is some sort of shell function, you might have to look at dummy's profile files.
1,376
Posted By m.d.ludwig
IMHO, this is perfectly fine. I would have done a...
IMHO, this is perfectly fine. I would have done a few things differently

not source ~/.profile, this script inheirits your enviornment
use variables for the files
not save the results in...
1,394
Posted By m.d.ludwig
Use the path to sshX in the argument to the -c...
Use the path to sshX in the argument to the -c option. If you need to find it:

su - dummy
which sshX
1,115
Posted By m.d.ludwig
Best is subjective :), but I would use awk: ...
Best is subjective :), but I would use awk:

{ $2 += 0; } # force numeric comparisions
$1 == "nFaces" { n = $2; }
$1 == "startFace" { if (startFace < $2) { nFaces = n;...
1,394
Posted By m.d.ludwig
su - dummy -c 'sshX -n dummy "ls -ltr"' >...
su - dummy -c 'sshX -n dummy "ls -ltr"' > ${HOME}/tmp
This will save the output of the command as file in the current user's home directory.

Since you can run ssh, can you add the local user's...
1,590
Posted By m.d.ludwig
I have no idea what you are trying to do. What is...
I have no idea what you are trying to do. What is being indexed? Please give a verbal description of your process, or something.
1,223
Posted By m.d.ludwig
Use capital letters in the replacement text.
Use capital letters in the replacement text.
1,223
Posted By m.d.ludwig
$ sed -e...
$ sed -e 's/^.*SMB_[12][0-9]\([0-9][0-9][0-9][0-9][0-9][0-9]\)_.*/mv & TCAPMI_CatastropheLog_G\1_V6.csv/' filelist | sh -x
+ mv MSIRP_CatastropheLog_Data_Extract_-_TCAPMI_SMB_20111116_040028.txt...
1,590
Posted By m.d.ludwig
join might do what you need. Now to make it...
join might do what you need. Now to make it clearer, I changed file1 to:

A 1
B 2
C 3
So with join, you get:
$[b] join -j 2 file1 file2
1 A 7
2 B 9
3 C 10
You can use awk, sed, cut, or...
Forum: Solaris 12-06-2011
2,051
Posted By m.d.ludwig
I think something like: xargs listoclients |...
I think something like:
xargs listoclients | rsync syncargsmight do what you want.
Forum: Programming 12-06-2011
1,485
Posted By m.d.ludwig
The problem is the split. Taking a section of...
The problem is the split.
Taking a section of your code (in blue), and printing out the arguments to timelocal:

my $beginning = 'Fri Oct 6 05:54:09 2007';
my @b = split(/[:\s]/, $beginning);
...
2,037
Posted By m.d.ludwig
0936 - 09C1 is egrep...
0936 - 09C1 is

egrep '09(3[6-9A-F]|[4-9AB][0-9A-F]|C[01])$'

(assuming hexidecimal data)
Showing results 1 to 25 of 310

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