Search Results

Search: Posts Made By: m.d.ludwig
1,387
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,386
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,543
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,233
Posted By m.d.ludwig
Use capital letters in the replacement text.
Use capital letters in the replacement text.
1,233
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...
2,051
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)
4,122
Posted By m.d.ludwig
I have been looking at your problem for a while...
I have been looking at your problem for a while now -- and I have no idea what you are trying to accomplish. Can you please explain? And what function is "sed" providing?
4,563
Posted By m.d.ludwig
Some hints: popen...
Some hints:


popen (https://www.unix.com/man-page/linux/3/popen/) is not "open a pipe", it is more "open a process"
Use opendir (https://www.unix.com/man-page/Linux/3/opendir/)(3) to open a...
6,635
Posted By m.d.ludwig
#! /bin/bash trap_ctrlC() { echo...
#! /bin/bash

trap_ctrlC() {
echo '<CTRL-C> has been trapped'
read -p 'Enter to exit: ' line
exit 1
}

trap trap_ctrlC INT

while true; do
echo '<CTRL-C> to quit'
done
6,635
Posted By m.d.ludwig
Here is my results: ludwig$ bash x ...
Here is my results:

ludwig$ bash x
<CTRL-C> to quit
<CTRL-C> to quit
<CTRL-C> to quit
<CTRL-C> to quit
<CTRL-C> to quit
.
.
.
<CTRL-C> to quit
<CTRL-C> to quit
<CTRL-C> to quit...
2,833
Posted By m.d.ludwig
The reason you are not getting what you expect is...
The reason you are not getting what you expect is that xargs is re-invoking tar every time the command line fills. cpio could be used, or you could use the "-T" option of tar:
find ./ -type f -mtime...
Forum: HP-UX 11-29-2011
8,983
Posted By m.d.ludwig
If you take a moment to look at the gzip manual...
If you take a moment to look at the gzip manual page, the -9 option (aka --best) is for maximum compression.
7,623
Posted By m.d.ludwig
I assume there is much more to your perl script...
I assume there is much more to your perl script than the few lines you provided, but going with what you have:

#!/usr/local/bin/perl -w

use Env;

$ENV{NOLOG_qsub} = "";
system("run.ol...
2,002
Posted By m.d.ludwig
Apologies for a bad cut-n-paste: { C2[$1] +=...
Apologies for a bad cut-n-paste:

{ C2[$1] += $2; C3[$1] += $3; }
END { for (x in C2) printf "%s\t%d\t%d\n", x, C2[x], C3[x]; }
1,034
Posted By m.d.ludwig
Here you go: $, = ' '; $\ = "\n"; $_ =...
Here you go:
$, = ' ';
$\ = "\n";

$_ = <>;
my @R = split;

while (<>) {
my @N = split;
if ($P[2] == $R[0] && $P[3] == $R[1]) { @N[0..1] = @R[0..1]; }
@R = @N;
}

print @R;
2,059
Posted By m.d.ludwig
tr '\t' '\n' < infile > outfileSee the tr manual...
tr '\t' '\n' < infile > outfileSee the tr manual page for more details.
3,587
Posted By m.d.ludwig
The awk script:{ l[NR] = $1; n[$1]++; s[$1] +=...
The awk script:{ l[NR] = $1; n[$1]++; s[$1] += $2; }
END {
for (i in n) { a[i] = s[i] / n[i]; }
for (i = 1; i <= NR; i++) { print l[i], a[l[i]]; }
}Results in:Test1 7.5
Test1 7.5
Test2...
3,129
Posted By m.d.ludwig
@citaylor Yes, shell return status is...
@citaylor

Yes, shell return status is "opposite of typical". It is a consequence of using a exit status that is limited to a single value between 0 and 255. Indicating why a command fails with...
56,509
Posted By m.d.ludwig
Hurricane: Most (since I don't know all of...
Hurricane:

Most (since I don't know all of them, I cannot say "all") editors copy the file to be editted into memory, which is what you edit. The memory copy is written back to the file,...
2,064
Posted By m.d.ludwig
If you are running on a linux based OS, date...
If you are running on a linux based OS, date supports relative times, as in:
trogdor $ date
Mon Jan 17 15:08:38 EST 2011
trogdor $ date -d '4 hours ago' '+%d/%b/%Y:%H'
17/Jan/2011:11If your...
3,539
Posted By m.d.ludwig
<smacks onhead="hard">D'oh</smacks> ...
<smacks onhead="hard">D'oh</smacks>

Sometimes you get caught up with the tool you are using, when you should look at all your tools.
1,574
Posted By m.d.ludwig
I've run into this issue when I wrote an rsync...
I've run into this issue when I wrote an rsync script, in which I had to eval the command to get things to work properly, as in:

eval $RSYNC $rsync_param $SRC_DIR $USER@$TRG_SRV:$TRG_DIR >>...
2,610
Posted By m.d.ludwig
I cannot respond to what firefox does or does...
I cannot respond to what firefox does or does show when displaying the contents of a directory. I have to admit that I normally use a command line ftp client. As far as "folder size", some ftp...
38,399
Posted By m.d.ludwig
grep...
grep '"[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]"' inputfileYou can use the "-n" option to display the line number.

---------- Post updated at 06:07 PM ---------- Previous update was at...
2,610
Posted By m.d.ludwig
Your ftp client displays icons, not vsftpd. ...
Your ftp client displays icons, not vsftpd.

For folder sizes -- are you referring to the sum of the sizes of the files contained in a folder? Or the size of the directory itself?
Showing results 1 to 25 of 60

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