Search Results

Search: Posts Made By: Chubler_XL
Forum: Solaris 4 Weeks Ago
1,582
Posted By hicksd8
One thing for sure is that only one of the nodes...
One thing for sure is that only one of the nodes (Solaris 11 Global or Solaris 10 LDOM) can have control of the volume. In any situation, having two operating systems writing to a volume...
2,798
Posted By wisecracker
I am assuming you are using bash or perhaps a...
I am assuming you are using bash or perhaps a POSIX shell like dash.
Your error is telling you that it is not possible to do such a task as these shells have INTEGER arithmetic only.

If you need...
2,777
Posted By MadeInGermany
fgrep -v -x -f is more precise than grep -v -f...
fgrep -v -x -f is more precise than grep -v -f because it compares the full lines.
For ex bc should not match abc or bcd.
(A halfway approach would be grep -v -w -f that at least checks for word...
2,508
Posted By RudiC
Why not simplyinstalldir=${1//\\\\n/ }?
Why not simplyinstalldir=${1//\\\\n/ }?
2,567
Posted By MadeInGermany
You must give a facility.severity pair after -p ...
You must give a facility.severity pair after -p
For ex
logger -p user.err "XY 6990 - ERC API on $(hostname) is restarted"
The syslog service determines which file user.err is.
2,941
Posted By SDohmen
Converting XML to CSV
Hello,


For i while i have been using XMLStarlet to convert several XML files to CSV files. So far this always went fine.


Today however i got a new XML format however but i cannot find out...
321
Posted By balajesuri
I think OP is asking for side by side printing of...
I think OP is asking for side by side printing of the output of two python scripts as they run, and has shown as an example, concatenation of two text files using izip_longest().


@bigvito19...
2,490
Posted By Neo
Some say this is the reason that Apple ships with...
Some say this is the reason that Apple ships with an older version of bash:

Reference:

GNU General Public License - Wikipedia...
2,490
Posted By Corona688
BASH allows you to use the basic TTY properties...
BASH allows you to use the basic TTY properties to establish timeouts and read minimums:

#!/bin/bash

# Timeout is 1/10 of a second, minimum read is 0 characters
stty -icanon min 0 time 1
...
3,119
Posted By rohit_shinez
I completely agree with your approach which...
I completely agree with your approach which handles all type of scenarios. Thanks guys for your help
3,119
Posted By Corona688
#!/bin/bash MIN=1 MAX=10 STARS=0 ...
#!/bin/bash

MIN=1
MAX=10
STARS=0

S=$(printf '%*s' "$((MAX*2))" '')
D=${S// / *}

for ((N=MIN; N < (MAX*2); N++ && (STARS += W)))
do
[ "$N" -gt "$MAX" ] && W=$(((MAX*2)-N)) ||...
3,595
Posted By MadeInGermany
#/bin/bash if [ $# -eq 0 ] then echo...
#/bin/bash
if [ $# -eq 0 ]
then
echo "usage:
$0 procnames ..."
exit 1
fi
{
echo "#define PROCESS_COUNT $#"
printf "#define %s\n" "$@"
tail -n +3 "proc_hide.c"
} > hidelib.c
3,932
Posted By jcdole
Thank you very much. Nice demo. PS a...
Thank you very much.
Nice demo.


PS a dash is missing at the last line :
\) -o print
must be
\) -o -print
611
Posted By jim mcnamara
Chubler_XL - yes and no. One problem -...
Chubler_XL - yes and no.

One problem - lpstat -o reports data from the print queue acceptance time, not the mtime of a file. In other words, you could send a 10 year old file to a print queue...
478
Posted By rdrtx1
word=dominos KEYWORD=$(echo "$word" | awk '...
word=dominos

KEYWORD=$(echo "$word" | awk ' {
for (i=1; i<=length; i++)
printf "%s", substr($0, 1, a++) b substr($0, a+1) FS;
for (j=length; j>1; j--)
for (i=1; i<j; i++)
...
805
Posted By Scrutinizer
How about a concept like this, mutable without...
How about a concept like this, mutable without eval .. :
#!/usr/local/bin/dash
set -- a b c
array() {
_pos=$1
_newval=$2
_ARRAY= _i=-1 _val=
shift 2
for _val in "$@"
do
if [...
475
Posted By Don Cragun
Hi Chubler_XL, Your example works fine for the...
Hi Chubler_XL,
Your example works fine for the example you've chosen, but, as mattz40 mentioned in post #4 in this thread, it won't work if one or more of the filenames in the lists in the...
573
Posted By apmcd47
I've found this message...
I've found this message (http://lists.gnu.org/archive/html/bug-coreutils/2014-04/msg00015.html) in the bug-coreutils list. It turns out that date is parsing the + 1 as offset from UTC. This can be...
490
Posted By Don Cragun
This will work if you're using GNU awk. But,...
This will work if you're using GNU awk.

But, according to the standards, the results are unspecified if the value assigned to RS is more than one character. On most BSD- and UNIX-systems, awk...
731
Posted By MadeInGermany
Pardon? What is PGN? -- Another sed solution...
Pardon? What is PGN?
--
Another sed solution that will save some memory, by only reading the needed lines into the input buffer.
Written as a multi-liner (better readable):
sed '
:loop
/{/{
...
904
Posted By Corona688
As mentioned above, your MS Windows style text...
As mentioned above, your MS Windows style text file is full of carriage returns:

0000040 sp a n d sp O p e r a t o r cr nl G
6120 646e 4f20 6570 ...
626
Posted By RudiC
Try awk ' {if (!(a[$3,$4])) {if...
Try
awk '
{if (!(a[$3,$4])) {if (a[$4,$3]) {X = $4
$4 = $3
$3 = X
...
574
Posted By MadeInGermany
The symptom "while read loop stops after one...
The symptom "while read loop stops after one cycle" is typical for a conmand that reads from stdin, sucking from the input that is for the read command.
Maybe HandBrakeCLI is such a command? Then it...
1,005
Posted By Aia
A for loop is _almost_ never a good choice to...
A for loop is _almost_ never a good choice to iterate over lines in a file, nor for dealing with file/directory paths since the default separator is white space. That means that if a filename or...
671
Posted By Aia
Python does not need help from the shell or...
Python does not need help from the shell or another utilities to do what it is shown:

Modify test.py to handle the parsing, the sorting, the processing of uniqueness and the tokenization of the...
Showing results 1 to 25 of 173

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