Search Results

Search: Posts Made By: AbelLuis
1,518
Posted By AbelLuis
Yes, it's true. The problem was the lack of a...
Yes, it's true. The problem was the lack of a space between {} and +.

Regards.
5,213
Posted By AbelLuis
Hi all, there is an ancient formula that...
Hi all,
there is an ancient formula that convert quickly a "gregorian" date (month, day, year) to "julian" date (number of days from January 1 of year 1).

This is the implementation in awk.
...
1,518
Posted By AbelLuis
This script work fine in my computer: ...
This script work fine in my computer:


#!/bin/ksh
#Script Below#
#Add additional lines to config options.
. ./prune.config
eval "$DIR1 $DIR1OPTIONS"
Regards.

---------- Post updated...
1,518
Posted By AbelLuis
The following may help: ksh -x ./prune.kshSo...
The following may help:

ksh -x ./prune.kshSo we can see how is parsed the statement.

Regards.
1,518
Posted By AbelLuis
Hi, Try this: find /directory/holding...
Hi,
Try this:


find /directory/holding -type f ! -name "*.gz" ! -name "*PDF*" ! -name "*TIF*" -size +1000k -mmin +120 -exec gzip {}+ \;
The final \; for the exec clause is mandatory. I don't...
5,870
Posted By AbelLuis
Hi, you may try this: RE="/$A1/ && /$A2/...
Hi, you may try this:


RE="/$A1/ && /$A2/ && /$A3/"
eval awk "'" $RE "'" filename
The first line is for the expansion of parameters; the second, eval, parses and execute the built command.
...
1,792
Posted By AbelLuis
You need to clarify your own purposes. Just...
You need to clarify your own purposes.

Just say us how you proceeded manually to get the third file.

Regards.
2,510
Posted By AbelLuis
@Don Cragun This is the way that bash evaluates...
@Don Cragun
This is the way that bash evaluates the single quote in Debian:


~$: grep -ia 'ORA-[0-9]\{5\}:' Rep* | grep -iavE "`cat /tmp/i.txt`"
+ grep -ia 'ORA-[0-9]\{5\}:' Rep-date
++ cat...
2,510
Posted By AbelLuis
Hi, there is a space in the file ...
Hi,
there is a space in the file

...ORA-06512|Domestic Phone|ENCRYPTION)'
---------------------^
You may try this:


grep -ia 'ORA-[0-9]\{5\}:' Rep* |grep -iavE "`cat /tmp/i.txt`"
...to...
1,792
Posted By AbelLuis
Yes, I agree, the merge option requieres previous...
Yes, I agree, the merge option requieres previous sorted files.

Regards.
1,792
Posted By AbelLuis
Yes, I agree. The command must be sort -mu...
Yes, I agree. The command must be

sort -mu file1 file2 > combined_fileI wonder if always is it the same that

sort -u file1 file2 > combined_fileRegards.

Post Data:

Perhaps the difference...
1,792
Posted By AbelLuis
Hi, If I have understand your post, you may...
Hi,
If I have understand your post, you may try with this:


sort -m file1 file2 > combined_file
It is the merge option of the sort command. It gives the desired output for the particular case...
2,812
Posted By AbelLuis
Thanks, @Scrutinizer. If I wanto to match...
Thanks, @Scrutinizer.

If I wanto to match the re's with single quotes and colon,

awk '$7=="PASS" && /\'oncomineGeneClass\':/ && /\'oncomineVariantClass\':/' fileIt doesn't work so. How...
2,812
Posted By AbelLuis
Hello, The problem is the regular expression,...
Hello,
The problem is the regular expression, and in the input file the keys are enclosed in single quotes (').
This is not a very smart code, but it works:

awk -F'\t'
'
BEGIN{...
Forum: AIX 05-06-2017
5,214
Posted By AbelLuis
Hi, may you show us the nohup.out file? ...
Hi,
may you show us the nohup.out file?

Also you may try with:

nohup sh scp.sh >scp.out 2>&1 &
If the shell or the utility are trying to read from tty, there may be a prpblem...
19,140
Posted By AbelLuis
I am happy that it was useful. Greetings!
I am happy that it was useful.

Greetings!
19,140
Posted By AbelLuis
Hi, Commands work with if without mediation of...
Hi,
Commands work with if without mediation of "test" (brackets []):

if grep "name>$servername" $1; then
The return code is enough for "if".

Also:


if [ $? -eq 0 ]; then
...is...
2,693
Posted By AbelLuis
Hi, drl, this worked on the original sample: ...
Hi, drl,
this worked on the original sample:


#!/usr/bin/awk -f

{
n1=match($0, "\x27");
n2=match(substr($0, n1+1), "\x27");

while ( n1 > 0 ){
printf("%s", tolower(substr($0, 1,...
2,693
Posted By AbelLuis
Hi, John K, you may try this: awk '{ ...
Hi, John K,
you may try this:


awk '{
for (i=1; i<=NF; i++ )
if ( substr($i, 1, 1) == "\x27" && substr($i, length($i), 1)=="\x27")
...
1,402
Posted By AbelLuis
@jim mcnamara I added that way because it...
@jim mcnamara

I added that way because it was the original request.



Regards.
1,402
Posted By AbelLuis
Hi, this is just another way. You only nee...
Hi,
this is just another way.

You only nee to add a semicolon at the end of each command.


myTest () { echo "MYPWD=$(echo $(pwd))"; echo "MYLOGNAME=${LOGNAME}"; } myCar () { echo...
7,155
Posted By AbelLuis
@Scrutinizer <<what is the sense of introducing...
@Scrutinizer
<<what is the sense of introducing "eval" here.>>
The function Command build the name of a call to SQL, but don't execute it; so it need to be parsed and executed. "eval" does it. ...
7,155
Posted By AbelLuis
Dear Samah, You are trying to program with...
Dear Samah,

You are trying to program with many levels of language at a time.

I suggest:

A) use set -x to debug

B) Try one level at a time

C) Try this command line:


eval $(Command...
3,828
Posted By AbelLuis
Try this: nawk '{ f4=""; for (...
Try this:


nawk '{ f4="";
for ( i=4; i<= NF; i++)
f4=f4 $i;
print $1, $2, $3, "<", f4, ">"; }'
4,092
Posted By AbelLuis
nawk '{ print $0, length($0), NR }' file | sort |...
nawk '{ print $0, length($0), NR }' file | sort | nawk 'NR==1 {old=substr($0, 1, $(NF-1) ); next} {if ( old==substr($0, 1, $(NF-1) ) ) {print $0, $NF; old=substr($0, 1, $(NF-1))}'
Only to correct a...
Showing results 1 to 25 of 27

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