Search Results

Search: Posts Made By: RudiC
112
Posted By nezabudka
Hi Maybe this will help? ss -t -o state...
Hi
Maybe this will help?
ss -t -o state established

--- Post updated at 16:07 ---

ss -t -o state connected
ss -t -o state synchronized
318
Posted By MadeInGermany
Can be done as a { } group. (Note: there must be...
Can be done as a { } group. (Note: there must be a semicolon or newline before the closing brace! And of cause spaces next to the [ ] { } )
if [ -f ./file2 ] && [ -f ./file3 ] && { [ -f ./file1 ]...
306
Posted By rbatte1
One line sed option
How about using a single line sed like this:-sed "s/^C\( CALL.*'\(Gmax\|Gmin\|HS10\|HS2\|HS9\|Hmax\)'.*\)/\1/" source_file_name > target_file_name

It's a little messy to read, so:-

The s...
303
Posted By rbatte1
This is telling you that the value for pday is...
This is telling you that the value for pday is not set or not an integer, so your command as a whole becomes invalid. Could you sh -xv rmAgingFile.sh file*.log 2 and review the output to see what is...
402
Posted By vgersh99
be careful... some awk's don't have NR available...
be careful... some awk's don't have NR available in the END block. Just reassign NR to nr in your "main" block and use it in the END.
802
Posted By rbatte1
From my suggestion in post 5, I'm sure you can...
From my suggestion in post 5, I'm sure you can attempt to replace the sub-process on line 2 (the bit between $( and )) such that the output it creates uses a loop based on a counter to create the...
802
Posted By rbatte1
Do you want something more like:printf --...
Do you want something more like:printf -- "/path/to/xxx.py \\\\\n%s\n\t--ref /path/to/file \\\\\n\t--run /path/to/data\n" \ # Set up the output format with fixed strings and an...
719
Posted By Chubler_XL
You could you an awk script like this: awk...
You could you an awk script like this:

awk -F$'\t' '
NR>1 {
H=H OFS $2
V=$3
$0=$1
$NR=V
L[NR] = $0
}
END {
print "Date_Time" H
for(i=2; i in L; i++) print L[i]
...
152
Posted By vgersh99
if you need to "fold" the lines at 60 char width,...
if you need to "fold" the lines at 60 char width, pipe the output to fold:
awk .... | fold -w 60
812
Posted By vgersh99
first off: #!/bin/ksh secondly, where do you...
first off: #!/bin/ksh
secondly, where do you expect your DAS_VetFed.txt file to be? Looks like the working dir where the script was invoked from.
But then I see:
dir=/mydirectory
cd $dir
So I'd...
878
Posted By rbatte1
Does the output from last show you who (and where...
Does the output from last show you who (and where from) people were logged in at that time? Look especially for lines that say down in them.

Does that help you?


It might help in future if...
1,255
Posted By Chubler_XL
RudiC although your replace works for ~/dir/path...
RudiC although your replace works for ~/dir/path it would not work for ~root/data/mydatafile or /home/dba/data~files/myarray.dat.
The function in post #7 supplies a more accurate expansion.
1,255
Posted By Chubler_XL
The problem is ~ is not being expanded. It turns...
The problem is ~ is not being expanded. It turns out to be a little tricky to expand ~ but also avoid word separation on the path name (white spaces in you array source filename).

Try:function...
817
Posted By MadeInGermany
Include the existing trailing spaces in order to...
Include the existing trailing spaces in order to replace(=remove) them:
s/ID3 */$NEW${SPC:${#NEW}}/
A variant with printf:
sed -i "s/ID3 */$(printf "%-10s" "$NEW")/" TESTFILE_TEST
1,171
Posted By nezabudka
awk -F'<<|>>' '{while((getline d<$2) >...
awk -F'<<|>>' '{while((getline d<$2) > 0){while((getline b<$4) > 0) print $1 d $3 b $4; close($4)}}'
1,093
Posted By Scrutinizer
Try: awk ' NR==FNR { ...
Try:

awk '
NR==FNR { # When reading the first file (then NR is equal to FNR)
A[$1]=$0 # Store the first file...
550
Posted By MadeInGermany
The echo $a1 | ssh ... redirects stdin - but...
The echo $a1 | ssh ... redirects stdin - but nothing reads from it.
You can just redirect stdin with </dev/null ssh ... or close stdin with ssh -n ...; that should have the same effect and not...
796
Posted By vgersh99
Strange... Given your sample input in post#1...
Strange...
Given your sample input in post#1 and using RudiC's code, I get:

{"NAME":"QLogic 570x/571x Gigabit Ethernet Driver",
"VERSION":"11.11,REV=2009.11.11",
"BASEDIR":"/"}
{"NAME":"QLogic...
2,330
Posted By Scrutinizer
Hi, try: join -t \| -a 1 -a 2 -e 'NULL' -o 0...
Hi, try:
join -t \| -a 1 -a 2 -e 'NULL' -o 0 1.2 1.3 1.4 2.2 2.3 2.4 \
<(join -t \| -a 1 -a 2 -e 'NULL' -o 0 1.2 2.2 2.3 file1 file2) file3
2,888
Posted By wisecracker
Perhaps because the OP might mistake '1' as being...
Perhaps because the OP might mistake '1' as being a result or a '$?' as opposed to a 'true'.
(Also it does not work in POSIX but that is my reason not the OP's.)
2,135
Posted By MadeInGermany
Attention: ssh -qn is ssh -q -n where -n...
Attention:
ssh -qn is ssh -q -n where -n inhibits reading from stdin - good for ssh -q -n remotehost remotecommand. But it must be ssh -q remotehost < file and ssh -q remotehost << heredoc and ...
967
Posted By rbatte1
If you have them in a file, how about:-cut -f-3...
If you have them in a file, how about:-cut -f-3 -d"." input|sort|uniq -cWould that do? It's not quite the pretty output, but you get the detail you need.



I hope that this helps,
Robin
2,327
Posted By Scrutinizer
Indeed \| is a GNU extension to Basic Regular...
Indeed \| is a GNU extension to Basic Regular Expressions ( BRE ), as are \? and \+. But I do not see a use for them, since GNU utilities also support at least Extended Regular Expressions (ERE)...
1,312
Posted By MadeInGermany
${IARR[-1]} is bash-4. ksh (and bash-3) need...
${IARR[-1]} is bash-4.
ksh (and bash-3) need ${IARR[${#IARR[@]}-1]}

read -A and <<< require ksh93 - do not work with the older ksh88.
1,527
Posted By gull04
Hi, Using the data that you provided in the...
Hi,

Using the data that you provided in the previous post and the "grep" already supplied I get;

[e434069@fbakirpomd4 data]$ grep -v " [01] *[+-]" test_01.txt
chr10 85504 85558...
Showing results 1 to 25 of 500

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