Search Results

Search: Posts Made By: Scrutinizer
240
Posted By Scrutinizer
Try: if [ "${harr1[j]}" = "$search" ] or if...
Try:
if [ "${harr1[j]}" = "$search" ]
or
if [[ ${harr1[j]} == $search ]]
274
Posted By Scrutinizer
If you use the variable FILES, then when when you...
If you use the variable FILES, then when when you expand it, it becomes susceptible to field splitting by the shell and that can break your script if there are files that contain spaces..

Either...
Forum: What is on Your Mind? 6 Days Ago
348
Posted By Scrutinizer
Magenta, but slightly darker might be nice,...
Magenta, but slightly darker might be nice, maybe, or purple or dark orange, or mid green?

Example Dark Orange :
https://www.unix.com/members/302052697-albums87-picture1263.png
Forum: What is on Your Mind? 1 Week Ago
348
Posted By Scrutinizer
Ouch, I can hardly look at it :D
Ouch, I can hardly look at it :D
312
Posted By Scrutinizer
Some more: awk -F, '{n=split($(NF-3), F,...
Some more:
awk -F, '{n=split($(NF-3), F, "[/.]"); print F[n-3]}' file
sed 's|.*,/[^.]*/||; s|\..*||' file
581
Posted By Scrutinizer
@duke0001, You are welcome... In order for...
@duke0001, You are welcome...

In order for the awk approach to function, your DB query would need to produce output like you specified in post #1:


Since you are using Solaris 11, probably you...
435
Posted By Scrutinizer
Hi, try: awk ' /SELECT *LISTAGG/ { ...
Hi, try:

awk '
/SELECT *LISTAGG/ {
printf "--ignore begin\n%s\n--ignore end\n\n", $0
gsub(/LISTAGG[^)]*\)/,"CountMannuArray(&)")
}
{
print
}
' RS= ORS='\n\n' file
...
581
Posted By Scrutinizer
You could try an alternate approach like this,...
You could try an alternate approach like this, piping the output of your database command into an awk script, who processes it as stdin:

some_database_command |
awk '
NR==FNR { ...
Forum: What is on Your Mind? 1 Week Ago
580
Posted By Scrutinizer
Welcome back Nicki !
Welcome back Nicki !
581
Posted By Scrutinizer
Try [0-9]\{4\}\.[0-9]\{3\} The dot needs to be...
Try [0-9]\{4\}\.[0-9]\{3\}
The dot needs to be escaped with a backslash, since it is a special character in regular expressions
504
Posted By Scrutinizer
I tried the second one and it works, but your...
I tried the second one and it works, but your input file seems to broken. Try it with this one:
10264;ATE;12
10265;SES;11
10266;AUT;50
10264;ATE;10
10265;SES;13
10266;AUT;89
10264;ATE;1...
622
Posted By Scrutinizer
Also try: tr , '\n' < file | pr -2ts,
Also try:
tr , '\n' < file | pr -2ts,
Forum: Shell Programming and Scripting 3 Weeks Ago
758
Posted By Scrutinizer
^[^#]*= is an extended regular expression...
^[^#]*= is an extended regular expression (https://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html) and it means 0 or more non-# characters starting at the beginning of the line...
Forum: Shell Programming and Scripting 3 Weeks Ago
813
Posted By Scrutinizer
Something like this (quick and dirty)? #...
Something like this (quick and dirty)?

# grep -E 'ltm virtual|source-address-translation|pool|destination' file
ltm virtual /Common/CDN_NF2_SGW_INT_443 {
destination /Common/172.23.120.40:443...
Forum: Programming 4 Weeks Ago
241
Posted By Scrutinizer
The idea is neat I think, but it did not...
The idea is neat I think, but it did not correctly interpret the first thing I threw at it.
It does not seem to like POSIX character classes:
^[0-9A-Z[:space:]]
^[[:alpha:]]

--
Never mind,...
850
Posted By Scrutinizer
You could transpose the rows and columns, there...
You could transpose the rows and columns, there are many examples on these forums and import into excel as a csv file

or:
Have you tried the pivot function when pasting in Excel?
Forum: Shell Programming and Scripting 4 Weeks Ago
1,021
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)...
913
Posted By Scrutinizer
ksh93+, (ksh was the shell the OP specified),...
ksh93+, (ksh was the shell the OP specified), also supports negative indexes, to indicate elements from right to left (probably after a certain revision level).
zsh also does this, but the first...
Forum: Shell Programming and Scripting 4 Weeks Ago
1,021
Posted By Scrutinizer
Hello Rohit, the -r option as specified by the OP...
Hello Rohit, the -r option as specified by the OP is GNU sed, regular sed can not do alternation ( nz|sa )

With BSD sed (like on MacOS) you can try sed -E
Forum: Shell Programming and Scripting 4 Weeks Ago
1,021
Posted By Scrutinizer
Hi, try: echo...
Hi, try:

echo '@code_temp_table_$value_table'| sed -r "s/\@code/${input}/; /^(nz|sa)_/s/\\\$value_/\$value1_/"

Within double quotes, you need to escape both the \ and the $ character, to...
1,089
Posted By Scrutinizer
Perhaps also: awk '$5!~/^[01]$/' file or ...
Perhaps also:
awk '$5!~/^[01]$/' file
or
awk '$5>1' file
916
Posted By Scrutinizer
Indeed, the operation should be line based,...
Indeed, the operation should be line based, rather than word based, since file names can have spaces in them.

Compare:
echo "${array1[@]}" "${array2[@]}" | tr ' ' '\n' | sort | uniq -u

with:...
Forum: What is on Your Mind? 09-08-2019
1,270
Posted By Scrutinizer
Welcome to the MOD team, Akshay !
Welcome to the MOD team, Akshay !
Forum: What is on Your Mind? 09-08-2019
1,251
Posted By Scrutinizer
Welcome to the team, Yoda!
Welcome to the team, Yoda!
1,365
Posted By Scrutinizer
At first glance I noticed the use of wait 3. I...
At first glance I noticed the use of wait 3. I think you mean sleep 3
Showing results 1 to 25 of 500

 

Featured Tech Videos

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