Search Results

Search: Posts Made By: Ivo Breeden
6,274
Posted By Ivo Breeden
sed '/^$/q' filename Meaning: search for a...
sed '/^$/q' filename
Meaning: search for a line containing only begin (^) and end of line ($). Then quit (q).
1,725
Posted By Ivo Breeden
You could be more precise in the usage of the...
You could be more precise in the usage of the `ps` command. Instead of using
ps -ef
(as everybody does) you might specify:
ps -e -o pid,comm,command
This would give you the pid, the short...
1,584
Posted By Ivo Breeden
enhanced formatting
What is your problem exactly? Does the option "--timeout 2m" not work? If that is the case, the manual says:

-t, --timeout N
timeout after N seconds

So try "--timeout 120" . And if you...
813
Posted By Ivo Breeden
Like this? #!/usr/bin/ksh for status in...
Like this?

#!/usr/bin/ksh
for status in missing failed
do
for disk in `lspv | awk '{print $1}'`
do
for path in `lspath -l ${disk} -s ${status} -F "name parent path_id connection" |...
2,660
Posted By Ivo Breeden
withdrawn
withdrawn
2,124
Posted By Ivo Breeden
But sometimes one can do someting with...
But sometimes one can do someting with nonportable options.
One example is the echo command. For ages I used echo \t\b\n to echo tab, bel or newline. But this does not work anymore in bash. If you...
1,490
Posted By Ivo Breeden
apmcd47, I agree with most of your proposals, but...
apmcd47, I agree with most of your proposals, but the question of YouNicks was: ... to rm the contents of a directory without deleting the directory. So $DIR/* is not superfluous. So this line should...
1,234
Posted By Ivo Breeden
find /home/test -name "*.testfile" -type f -exec...
find /home/test -name "*.testfile" -type f -exec rm -irf $(dirname {}) \;
1,752
Posted By Ivo Breeden
Hello p1ne, I would like to help you to make...
Hello p1ne,
I would like to help you to make good scripts. But to do this I want you to think about the following questions:

what is the use of "for loops"? Why would one use them?
to how many...
2,268
Posted By Ivo Breeden
Hello Mirwasim, Your script is getting better. ...
Hello Mirwasim,
Your script is getting better.
Try this:

nawk 'BEGIN{print "<table border="1">"}
{print "<tr>";
print "<TD>";
for(i=1;i<NF;i++) printf("%s ", $i);
...
2,268
Posted By Ivo Breeden
Dear Mirwasim, You posted the input several...
Dear Mirwasim,
You posted the input several times. But the output Corona and Rudy want to see is not so clear. Based on your script I guess you want this output:

<TABLE>
<TR>
<TD>fixed...
3,339
Posted By Ivo Breeden
First: `man find` shows there are options for...
First: `man find` shows there are options for "UNUSUAL FILENAMES" (e.g. filenames with spaces).

-print0
True; print the full file name on the standard output, followed by a...
2,019
Posted By Ivo Breeden
Scrutinizer is right when he says: "the...
Scrutinizer is right when he says: "the assignment ( var=pattern* is the same as var="pattern*" )". It can be tested by adding quotes around the argument of echo:

abcversion=abc*
echo...
1,399
Posted By Ivo Breeden
sed --in-place 's/0.00/#Missing/g'...
sed --in-place 's/0.00/#Missing/g' /app/hyp_app/files/*.csv
2,019
Posted By Ivo Breeden
When you assign abcversion="abc*" then...
When you assign abcversion="abc*" then $abcversion will contain just "abc*". It will not be set to "abcga5" because the quotes prevent globbing.
In the next line you do:
echo $abcversion which...
4,217
Posted By Ivo Breeden
join using join command
why not use the join command to join files? The problem is it only can join on 1 field in each file (default the first field in each file). But after the first join it gets much easier.

$ join -t...
Showing results 1 to 16 of 16

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