Search Results

Search: Posts Made By: Sekullos
1,849
Posted By Sekullos
2 different databases on different servers. I...
2 different databases on different servers. I only have access to one, the other is from another service. I just printed with awk what i needed so that both files are formated the same way.

I ll...
1,849
Posted By Sekullos
Q: Howto compare 2 files
Greetings,

I made an extraction on 2 different databases. What I need to do is to compare those extractions to know what is on database1 which is not on database2 and vice versa.

In those...
4,647
Posted By Sekullos
Ok indeed I just tested this @ home on a...
Ok indeed I just tested this @ home on a different KSH version and it's working fine.

Oh well, I don't think upgrading this at the office won't be easy.

Thanks a lot for the troubleshooting...
2,554
Posted By Sekullos
yep yep it works fine to show the timestamp...
yep yep it works fine to show the timestamp correctly but after that i wish to do a grep on my log file counting XX alarms like so :


for i in $(seq 0 $HOUR); do printf "%s %02d:\n" "$DATE" "$i";...
2,554
Posted By Sekullos
Sweet works perfectly to show 0 on that $i...
Sweet works perfectly to show 0 on that $i variable using printf but I m still not able to use that $i to grep the current date.
The output would be like this : "grep Feb 28 1:" instead of "grep Feb...
2,554
Posted By Sekullos
How to show first 0 using seq or +1 count?
Greetings,

Using linux based OS and KSH.

I m trying to make a simple script to parse some logs to show a count per hour on a specific alarm starting from midnight to the current hour.

So I...
4,647
Posted By Sekullos
:eek: So you see my dilema :)
:eek:

So you see my dilema :)
4,647
Posted By Sekullos
Anyone else might have an idea for a better...
Anyone else might have an idea for a better output using this menu?

Thanks
4,647
Posted By Sekullos
echo $KSH_VERSION @(#)PD KSH v5.2.14 99/07/13.2
echo $KSH_VERSION
@(#)PD KSH v5.2.14 99/07/13.2
4,647
Posted By Sekullos
Works on every Linux I ve been using so far. ...
Works on every Linux I ve been using so far.
Cent OS 6.0 and Linux xxx 2.6.9-42.ELhugemem
4,647
Posted By Sekullos
Two columns output in simple case menu?
EDIT : System used : Any Linux distribution.

Hello everyone,

I m having quite a headache trying to figure out why I m having a 2 columns output in the following code :

#!/bin/ksh

...
4,716
Posted By Sekullos
I might be wrong but I see a flaw in your contrôl. ...
I might be wrong but I see a flaw in your contrôl.

Your contrôl is based on this check :
if [ $INCEPT -gt 0 ]

$INCEPT being the value of your watched log_file. What happens if the process who feeds...
1,977
Posted By Sekullos
Nop I run the script from my "in" directory only...
Nop I run the script from my "in" directory only but yes for safety I ll modify the "find ." to "find /data/in" to avoid any problems.. If i happen to run it from other directories.. :)

And no, I...
4,686
Posted By Sekullos
Ah yes, didn't think about that.. :rolleyes: ...
Ah yes, didn't think about that.. :rolleyes:

fixed

find -maxdepth 1 -type d -name test -exec rm -rf {} \;
1,977
Posted By Sekullos
Well as mentionned above it's like that : ...
Well as mentionned above it's like that :

You misread.

At first I only move file with a specific extension (.ext) and if it succeeds, deletes the directory it was contained it.

For now the...
4,686
Posted By Sekullos
using rm with find -exec gives error
Greetings,

Everytime I use rm with find I get errors like find: ./test: No such file or directory

For exemple :


hostname> mkdir test
hostname> ls
test
hostname> find . -type d -name...
1,977
Posted By Sekullos
"Instead having 9,999 functions which do the same...
"Instead having 9,999 functions which do the same thing with slightly different values, just have your function take parameters."
- Well it's a good point and i would do that If I only wanted to do...
1,977
Posted By Sekullos
Is it possible make the shell read functions 1 by 1 and calling an other function?
Greetings,

I m wondering if it's possible do do the following :

I have a simple function called "FindMoveDelete" which does the following :


FindMoveDelete()
{
find . -iname...
2,808
Posted By Sekullos
Ah yes! working perfectly. Better solution...
Ah yes! working perfectly.

Better solution than declaring some new path in your .profile :


#!/bin/sh

export CFG_DIR=/path/do/your/cfg/dir
source $CFG_DIR/function.cfg


Functions...
2,808
Posted By Sekullos
It's more like that : In function.cfg i have...
It's more like that :

In function.cfg i have for exemple :


ConfirmOrExit()

{
while true
do
echo -n "Confirmez-vous l'extraction des données depuis $PWD vers $Destination? (o/n) : "...
2,808
Posted By Sekullos
Loading ".cfg" file from different directory
Greetings.

In sh or bash How do you load a conf file (full of variables / functions) from a different directory in your script?
That way my main script can be function free so i just have to call...
7,945
Posted By Sekullos
Mmmh it actualy worked for you? find ....
Mmmh it actualy worked for you?

find . -regex '.*[^0-9]\(0+1\)?.ext'
and
find . -regex '.*[^0-9]\(00?1\)?.ext'

gave me nothing
How do you check the default regextype? and what regextype is...
7,945
Posted By Sekullos
Problem with Yazu's solution is that i can't use...
Problem with Yazu's solution is that i can't use -exec to my find command if I | egrep.
So I made it go through a | while read line loop but i noticed some files were missing aswell.

And binlib...
7,945
Posted By Sekullos
Awww yes, it seems to be working out perfectly...
Awww yes, it seems to be working out perfectly thanks man

And yes I m aware of 1) I just didn't figure out a better way to do it. You make it look so simple now.
7,945
Posted By Sekullos
Find, regular expression, anyway to simplify this find command?
Hello everyone,
first post here, trying to learn scripting on my own and this forum as been really helpful so far. I made few little scripts working great but I m facing some problems with RE.

I...
Showing results 1 to 25 of 25

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