Search Results

Search: Posts Made By: felipe.vinturin
6
1,718
Posted By felipe.vinturin
Check the code below: ...
Check the code below:


tempFile="./fridayDate.tmp"
##########################################################
checkRetCode ()
{
lastRetCode=$?
if [ ${lastRetCode} -ne 0 ]
then
echo...
3,102
Posted By felipe.vinturin
Can't you escape the "-" before executing "grep"?...
Can't you escape the "-" before executing "grep"?

Check below:

$ text="-8x7YTVNk2KiuY-PWG5zzzjB-zzw"
$ string="-8x7YTVNk2KiuY-PWG5zzzjB-zzw"
$ echo "${text}" | sed 's/^-/\\-/g'...
6
1,718
Posted By felipe.vinturin
Check this function: $ cat nextFriday.sh ...
Check this function:

$ cat nextFriday.sh
getNextFridayDate()
{
currentDayName=`date +"%A"`
currentDate=`date +"%Y%m%d"`
countDays=1
while [ "${currentDayName}" != "Friday" ]
do...
37,389
Posted By felipe.vinturin
You are right! But that is the way I like to do...
You are right! But that is the way I like to do it! I think the code is easier to read this way! ;)
10,578
Posted By felipe.vinturin
Another way with "stty": $ cat noEchoPass.sh...
Another way with "stty":

$ cat noEchoPass.sh
sttySettings=`stty -g`
echo "Password: "
stty -echo
read pass
stty "${sttySettings}"
echo "pass: [${pass}]"
$ ./noEchoPass.sh
Password:
pass:...
4,798
Posted By felipe.vinturin
Please, post what defines that a line is...
Please, post what defines that a line is duplicated (an example line) and we will be able to help you! =o)
2,261
Posted By felipe.vinturin
You don't really need to use "if" statements, you...
You don't really need to use "if" statements, you can use "case":

while true
do
clear
echo "Menu Options: "
echo " 1. Create Script"
echo " 2. Show Script"
echo " 3. Delete...
2,350
Posted By felipe.vinturin
I generally work with both solutions: ----->...
I generally work with both solutions:
-----> Use: "WHENEVER SQLERROR EXIT 1" (as commented by Carlo)
-----> Redirect SQLPLus' output to a file and validate the error.
-----> Also use: "sqlplus -S...
4,506
Posted By felipe.vinturin
Another question: -----> The user: dml_prod...
Another question:
-----> The user: dml_prod can "see" the package: PAK_POPL_SUPPL?

Check with this query:

Select Owner,
Object_Name,
Object_Type
From All_Objects
Where...
3,463
Posted By felipe.vinturin
I think there is something wrong with your...
I think there is something wrong with your script!
If you are mounting your device to: /media/usb, why you are creating the directories like this: "mkdir /media/$numbers", it should be: "mkdir...
1,185
Posted By felipe.vinturin
Try this: cfgFile="CONFIG_SPEC_FILE" while...
Try this:

cfgFile="CONFIG_SPEC_FILE"
while true
do
echo "Enter your data [exit to finish]:"
read LINE

[ "${LINE}" == "exit" ] && break

echo "${LINE}" >> "${cfgFile}"
done

# cat...
1,110
Posted By felipe.vinturin
Have you tried this: ls -1 *.dat | \ while...
Have you tried this:

ls -1 *.dat | \
while read fname
do
echo "Current file is: [${fname}]."
done
# Or you can use "find"
find . -name "*.dat" -type f | \
while read fname
do
...
1,958
Posted By felipe.vinturin
Have you seen: expect? It may help you with it! ...
Have you seen: expect? It may help you with it!

A usefull link: Expect - Wikipedia, the free encyclopedia (http://en.wikipedia.org/wiki/Expect)

If you don't know anything about expect, you can...
29,453
Posted By felipe.vinturin
The same, but add an "r" as argument: sort...
The same, but add an "r" as argument:

sort -t\| +1nr infile
2,417
Posted By felipe.vinturin
Please, can you give further details about what...
Please, can you give further details about what you need? Then, maybe one of us can help you...
3,618
Posted By felipe.vinturin
Maybe this link helps you: Using putty with...
Maybe this link helps you: Using putty with OpenSSH (http://linux-sxs.org/networking/openssh.putty.html)
1,937
Posted By felipe.vinturin
Here it works! # line="PRI#echo $PWD" #...
Here it works!

# line="PRI#echo $PWD"
# command=`echo "${line}" | cut -d '#' -f2,3,4`
# $command
/current/path


You can try to use: eval, but be careful, eval is evil!

# line="PRI#echo...
25,374
Posted By felipe.vinturin
I know it does not have everything to do with...
I know it does not have everything to do with your question, but have you seen the autoexpect command? Check this link: autoexpect(1) - Linux man page (http://linux.die.net/man/1/autoexpect)

It...
10,453
Posted By felipe.vinturin
The problem is because awk's FILENAME points to...
The problem is because awk's FILENAME points to the filename and path, not only the filename!

Try to change FILENAME to:

# E.g. awk '{ns=split(FILENAME, arr, "/"); print arr[ns]}' <infile>
#...
1,863
Posted By felipe.vinturin
Please, execute the command below: find...
Please, execute the command below:

find /home/dataset -maxdepth 1 -name "hour_*.txt" -type f


I think it is an environment issue, because some "find" command distributions does not accept the:...
1,594
Posted By felipe.vinturin
Probably you have spaces in your input file! ...
Probably you have spaces in your input file!
Try:

sed 's# ##g' <inFile>


Or better:

sed 's#[ \t]##g' <inFile>
1,156
Posted By felipe.vinturin
#!/usr/bin/ksh for db in `grep ":Y" /etc/oratab...
#!/usr/bin/ksh
for db in `grep ":Y" /etc/oratab | awk -F":" '{print $1}'`
do
prunc=`ps -ef | grep -i pmon | awk '{print $NF}' | awk -F _ '{print $3}' | grep -c "${db}"`
if [ ${prunc} -eq 1 ]...
1,838
Posted By felipe.vinturin
Please, try this one: #!/bin/sh -x while...
Please, try this one:

#!/bin/sh -x
while read DAYS INDIR OUTDIR
do
echo "[${DAYS}] [${INDIR}] [${OUTDIR}]"
find ${INDIR} -type f -mtime ${DAYS} -exec mv {} ${OUTDIR} \;
done < ./tarconfig.sh...
1,838
Posted By felipe.vinturin
Have you tried: find $INDIR -type f "!" -mtime...
Have you tried:
find $INDIR -type f "!" -mtime $DAYS | xargs -t -I {} mv "{}" $OUTDIR

It uses an extra pipe, but it prints the command being execute!

---------- Post updated at 15:11...
7,325
Posted By felipe.vinturin
Simple: var=value It seems sqlplus...
Simple:

var=value


It seems sqlplus is not in your PATH environment variable.

Try:

export PATH=${PATH}:${ORACLE_HOME}/bin


Or check where in your environment Oracle home is.

If...
Showing results 1 to 25 of 40

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