Search Results

Search: Posts Made By: anbu23
Forum: What is on Your Mind? 3 Weeks Ago
1,029
Posted By RavinderSingh13
Thanks a TON Neo for giving me this GREAT honor...
Thanks a TON Neo for giving me this GREAT honor :b:, its always an honor to be a member of this GREAT site :b:, whatever I know in scripting/*nix I learnt from this forum/site and whatever way or...
Forum: What is on Your Mind? 4 Weeks Ago
1,029
Posted By Neo
Moderators of the Year 2019 - Ravinder Singh and Victor Berridge
Today, I am very pleased to announce that the Moderator of the Year Award, 2019 has two very deserving winners.

Ravinder Singh (RavinderSingh13) and Victor Berridge (vbe)

Victor (vbe) has...
Forum: What is on Your Mind? 12-22-2019
302
Posted By Neo
I see.... In my view, this is the "problem"...
I see....

In my view, this is the "problem" ....

Commercial organizations continue to show things about A.I. applications which make consumers "happy" and "feel good", like the examples you...
Forum: Programming 09-15-2019
1,239
Posted By RavinderSingh13
Regarding a GREAT site for understanding and Visualizing regex patterns.
Hello All,

While googling on regex I came across a site named Regulex Regulex´╝ÜJavaScript Regular Expression Visualizer (https://jex.im/regulex/#!flags=&re=%5E(a%7Cb%7Cc)(%5B%5E%40%5D*)%40(.*))
I...
1,345
Posted By rdrtx1
DB 3 is down.
DB 3 is down.
1,789
Posted By bakunin
In principle you can, but sed uses a lot of...
In principle you can, but sed uses a lot of characters with a special meaning to the shell. Therefore, to protect the shell from reading it, sed-commands are usually enclosed in single-quotes:

sed...
1,508
Posted By RudiC
No surprise "it is not working" as none of your...
No surprise "it is not working" as none of your attempts is addressing your problem if at all syntactically correct.



awk 'FNR == NR {SRCH[$3 "-" $2]; next} $2 in SRCH {print ">" $0}' FS="[]-...
483
Posted By MadeInGermany
For a simple concatenation of the lines, consider...
For a simple concatenation of the lines, consider paste
paste file1 file2More flexible is the shell
while read L1 <&3 && read L2 <&4
do
echo "$L1 #### $L2"
done 3< file1 4< file2
1,013
Posted By Scrutinizer
Two basic awk things to think of in this kind of...
Two basic awk things to think of in this kind of situation:

If the default FS is used, test $1 instead of $0. That way you are not dependent on leading spaces that may or may not be there.
If...
1,013
Posted By MadeInGermany
I would augment the previous sed solution with a...
I would augment the previous sed solution with a loop, and replace the line end with a space.
sed -e '/^[^0-9]/{' -e ':L' -e '$!N; s/\n\([^0-9]\)/ \1/; t L' -e '}' fileAs multi-line
sed '...
1,013
Posted By Scrutinizer
Some of the solutions will fail if there is a...
Some of the solutions will fail if there is a single last line that does not start with a number:
862.0
DIAPHRAGM, WITHOUT MENTION OF OPEN WOUND INTO CAVITY
862.1
DIAPHRAGM, WITH OPEN WOUND INTO...
1,271
Posted By RudiC
Try alsoawk '{ORS=/\/[nN]ode/?"\n":""}1'...
Try alsoawk '{ORS=/\/[nN]ode/?"\n":""}1' file
1,623
Posted By Don Cragun
If the sed command fails, the above suggestion...
If the sed command fails, the above suggestion will destroy the input file.
sed ... sourcefile > tmpfile && cp tmpfile sourcefile && rm -f tmpfile
will only replace sourcefile if the sed succeeded...
8,784
Posted By MadeInGermany
The condition ? trueaction : falseaction exists...
The condition ? trueaction : falseaction exists in awk like in C.
str gets the concatentation of str "\n" $0 if str is not null (undefined, empty, or 0), otherwise it gets $0.
$0 is the entire...
5,041
Posted By Don Cragun
Unfortunately, the standards say the results are...
Unfortunately, the standards say the results are unspecified if you have both a number and a g flag for a sed substitute command. On some systems, you will get what you showed above. On others,...
2,799
Posted By Don Cragun
There are huge differences between ksh (and bash...
There are huge differences between ksh (and bash ) test expression and [ expression ] versus [[ expression ]].

The test and [ are the names of utilities (usually the same physical utility and...
1,025
Posted By balajesuri
Here, let me google that for you...
Here, let me google that for you (http://lmgtfy.com/?q=linux+expect)
1,427
Posted By radoulov
If I understand correctly: $ cat a.sql ...
If I understand correctly:

$ cat a.sql
select &1 from dual;
$ field_name=sysdate
$ sqlplus -s '/ as sysdba' <<EOF
> @a.sql "$field_name"
> EOF
old 1: select &1 from dual
new 1: select...
1,284
Posted By Scrutinizer
@anbu: Novel approach, to force the number into...
@anbu: Novel approach, to force the number into string context. It brings with it, however, that it is implementation dependent whether locale is used to convert it and whether a "." is part of the...
2,172
Posted By alister
Since the shell does not need to expand anything...
Since the shell does not need to expand anything with them, there's no reason to use double quotes.

Habitually using double quotes when shell expansion isn't intended will eventually lead to a...
1,335
Posted By Scrutinizer
@anbu: you can do this more reliably, using RS=...
@anbu: you can do this more reliably, using RS= instead of RS='\n\n'. Also, standard awk can only use a single character for RS.
1,947
Posted By shamrock
Actually it should be...
Actually it should be...
3,052
Posted By Don Cragun
When you have a pipeline, the standards allow...
When you have a pipeline, the standards allow (but do not require) the elements of the pipeline to be in different shell execution environments. If your system does put them in different shell...
1,213
Posted By Scrutinizer
@anbu, you are right it could also be done from...
@anbu, you are right it could also be done from left to right instead of right to left (in fact the = "anchor" provides mini-right to lefts) The [^=] might not even be required and an asterisk gets...
883
Posted By RudiC
You couldn't miss aiming at the center of a broad...
You couldn't miss aiming at the center of a broad target like a +- 30 day month, even if one month's length is off by a day in leap years. The center is the 15th of each month, or the average of...
Showing results 1 to 25 of 28

 

Featured Tech Videos

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