Search Results

Search: Posts Made By: vgersh99
71
Posted By vgersh99
how about: awk -F"'" 'FNR%2{f1=$0;next}...
how about:

awk -F"'" 'FNR%2{f1=$0;next} {for(i=2;i<=NF;i+=2) print f1, $i}' myFile
66
Posted By vgersh99
now that we "think" we all know what you're...
now that we "think" we all know what you're after.... What have you tried and where exactly are you stuck?
167
Posted By vgersh99
how about: awk '{print $1,...
how about:

awk '{print $1, substr($1,length($1)-1)}' OFS='\t' myInputFile
Forum: What is on Your Mind? 1 Week Ago
629
Posted By vgersh99
btw, a nice succinct guide...
btw, a nice succinct guide (https://commonmark.org/help/) to the "markdown" primitives.
btw2, there's no "color-picker" in "discourse"? (I know I'm asking for too much)
425
Posted By vgersh99
a couple of things: 1. server 1 is not the same...
a couple of things:
1. server 1 is not the same as server1
2. I don't understand your sed line - it's not the same as I suggested. What's the meaning of \tom/?
3. shouldn't Connector port='8009'...
425
Posted By vgersh99
I'd test this in the well controlled env first. ...
I'd test this in the well controlled env first.
As you've not provided sufficient sample data, there's high possibility of some "side affects"
425
Posted By vgersh99
how about: echo '<Connector port="8009"...
how about:

echo '<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />' | sed '/<Connector port="8009".*\/>/ s#.*#<!-- & -->#'
228
Posted By vgersh99
how about a little bit more "interesting" - with...
how about a little bit more "interesting" - with the menu:

#!/bin/bash

menu=$(fdisk -l | awk '/Device Boot/ {for(i=2;i<=NF;i++) print substr($i,1, index($i, " ")-1)}' RS= FS='\n';echo 'quit')
...
519
Posted By vgersh99
how about (a bit verbose): awk -f san.awk...
how about (a bit verbose):
awk -f san.awk myInputFile, where san.awk is:

BEGIN {
FS=OFS="\t"
i1=1
i2=2
v=3
}
function abs(x) { return x < 0 ? -x : x }

FNR>1 {
idx=($i1 >...
Forum: What is on Your Mind? 3 Weeks Ago
1,225
Posted By vgersh99
Quick Q... do I need a new account for the...
Quick Q...
do I need a new account for the discourse "side of the house"?
Tried my creds from the main site, getting "Incorrect username, email or password"
Or it's not been "enabled/migrated" yet?
Forum: Programming 3 Weeks Ago
486
Posted By vgersh99
check man pages of cob - probably has to do with...
check man pages of cob - probably has to do with the compiler debug option(s).
505
Posted By vgersh99
or better yet /tmp/a.sh: #!/bin/bash while...
or better yet /tmp/a.sh:

#!/bin/bash
while IFS=, read f1 f2 junk
do
eval "$f2"
done < /tmp/a.txt


$ /tmp/a.sh
Filesystem Size Used Avail Use% Mounted on
C:/cygwin64 236G ...
505
Posted By vgersh99
either: #!/bin/bash a=$(df -kh|head -2) ...
either:

#!/bin/bash
a=$(df -kh|head -2)
echo "$a"

OR

#!/bin/bash
a='df -kh|head -2'
echo "$a"
eval "$a"

1st is preferred.
655
Posted By vgersh99
I'll leave it up to you to implement the shell...
I'll leave it up to you to implement the shell wrapper script, but...
for the 3 fields (5,8 and 12) to be modified, awk should be called as:
awk -v fld='5,8,12' -f hsquared.awk myFile.csv
655
Posted By vgersh99
a bit verbose and can be simplified - just...
a bit verbose and can be simplified - just following your description.

awk -v fld='5,8' -f hsquared.awk myFile.csv
where hsquared.awk is:
BEGIN {
FS=OFS=","
fld=(!fld)?"5":fld
...
189
Posted By vgersh99
No double posting - please continue here...
No double posting - please continue here (https://www.unix.com/unix-for-beginners-questions-and-answers/283873-changing-array-data-sed.html).
Thread closed.
907
Posted By vgersh99
when you say I am trying with this but getting...
when you say I am trying with this but getting error., what does it exactly mean?
What error?
What have you done to investigate the "error"?
Have you considered changing this sed 's/$key/$value/g'...
907
Posted By vgersh99
Could you show what you've tried and what you...
Could you show what you've tried and what you think is "missing"?
647
Posted By vgersh99
echo 'HiringManager_RHMC, DirectSupervisor_RHMC,...
echo 'HiringManager_RHMC, DirectSupervisor_RHMC, ProcessServerReadAccess_ST' | awk -F, '$1=$1' OFS='\n'
1,684
Posted By vgersh99
how about for starters: echo...
how about for starters:
echo 'https://example.com/live-hls/bla:bob-sd-blabla/playlist.m3u8' | sed 's#.*:\([^-][^-]*\)-.*#\1#'
662
Posted By vgersh99
so you're good to go?
so you're good to go?
662
Posted By vgersh99
what is this supposed to do? elif [ !...
what is this supposed to do? elif [ ! -"${arg_file+X}" ]; then
also don't forget the comment about #!/bin/bash - otherwise it's not a bash script
662
Posted By vgersh99
I'd start by removing the leading space from the...
I'd start by removing the leading space from the first line: #!/bin/bash - there should be no leading space before the #
Also there're 94 lines in the code sample you gave and the complain is for...
907
Posted By vgersh99
sorry, I don't think I can help - not sure of the...
sorry, I don't think I can help - not sure of the algorithm and you're not providing any hints.
Maybe other did better in their trigonometry in school.
Would be interesting to see the...
907
Posted By vgersh99
interesting puzzle! Are you saying one has to...
interesting puzzle!
Are you saying one has to "draw" an imaginary rectangle frame given the input coordinates?
I'm saying "imaginary", because the desired output coordinates are not in your input...
Showing results 1 to 25 of 500

 

Featured Tech Videos

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