Search Results

Search: Posts Made By: RudiC
100
Posted By Peasant
Have you tried running the grep -E -v...
Have you tried running the grep -E -v "string1|string2" and observe the results ?

Regards
Peasant.
527
Posted By Chubler_XL
You could use sed (or similar) to convert your...
You could use sed (or similar) to convert your input syntax to an awk expression eg:

CONDITIONS="(1=CT or 2=US_10) and 3=CT_US_10 and 4="
CONDITIONS=$(echo "$CONDITIONS" |
sed \
-e...
389
Posted By vgersh99
RudiC/rdrtx1, the binning, the percentage and...
RudiC/rdrtx1,
the binning, the percentage and the totals are somewhat different from the OP's desired output in post #1.
Hence post #2 with the ask to elaborate.
369
Posted By vbe
Yes, and depending of your knowledge of UNIX many...
Yes, and depending of your knowledge of UNIX many approaches and solutions...
What have you tried?
527
Posted By nezabudka
And where did you get the CONDITION variable in...
And where did you get the CONDITION variable in "awk"?

--- Post updated at 21:59 ---

Is a colon needed here?

maybe
{ if(strcondition(COND))print COND"|"$147"|"$15"|"$16"|"$17"|"$4}
285
Posted By rdrtx1
deleted.
deleted.
Forum: Shell Programming and Scripting 4 Weeks Ago
799
Posted By Aia
Hi Lord Spectre Please, review how you have...
Hi Lord Spectre

Please, review how you have executed the code from post #4. Based on your input it should have given you the desired output instead of no output as you mentioned.

Here's another...
803
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
977
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 ]...
980
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...
724
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...
761
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.
995
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...
995
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...
890
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]
...
167
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
905
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...
929
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,382
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,382
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...
865
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,270
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,161
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...
812
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...
849
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...
Showing results 1 to 25 of 500

 

Featured Tech Videos

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