Search Results

Search: Posts Made By: m.d.ludwig
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,544
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,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,234
Posted By m.d.ludwig
Use capital letters in the replacement text.
Use capital letters in the replacement text.
1,234
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,052
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,564
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,636
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...
6,636
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
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,624
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]; }
2,060
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.
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,612
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...
2,612
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?
38,400
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,065
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...
12,675
Posted By m.d.ludwig
There are many many ways you could to this. With...
There are many many ways you could to this. With grep, for instace:grep -v '^.........................T' inputfile(there should be 25 ".")

With awk, I'd:awk 'substr($0, 26, 1) != "T"' inputfileI...
1,575
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 >>...
56,510
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,...
39,471
Posted By m.d.ludwig
How about: sed -e 's/\'//g' -e 's/,/ /g'...
How about:
sed -e 's/\'//g' -e 's/,/ /g' inputfile

or you could have:
sed -e 's/\'//g' inputfile | awk -F, '.....'
3,589
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...
Showing results 1 to 25 of 60

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