Search Results

Search: Posts Made By: sauron
3,540
Posted By sauron
hi, you need to quote the variables: calc() ...
hi,
you need to quote the variables:
calc()
{
awk 'BEGIN {OFMT="%f"; print '"$*"'; exit}'
}
VAR1=20
VAR2=30
calc '('$VAR1' / '$VAR2') * 100'


Bye
2,059
Posted By sauron
yeah vgersh99, you're the number one:D
yeah vgersh99,
you're the number one:D
6,949
Posted By sauron
hi, try posting the command giving you command...
hi,
try posting the command giving you command non found
the code quirkasaurus suggested you works perfectly
2,059
Posted By sauron
Hi, this works, even if it is not that...
Hi,
this works, even if it is not that elegant:S

echo "3MMTQSZ348GGMZRQWMJM4SD6M" | awk ' {print substr($0,1,5)"-"substr($0,6,5)"-"substr($0,11,5)"-"substr($0,16,5)"-"substr($0,21,5)}'

Bye
3,240
Posted By sauron
hi, why don't add a else to your script? Bye
hi,
why don't add a else to your script?
Bye
6,949
Posted By sauron
Cool vgersh99, i love being useful end...
Cool vgersh99,

i love being useful end learning at the same time.

Bye
___________

Computers are like air-conditioners
they stop working properly
when you open windows
6,949
Posted By sauron
Hi, echo "abcd" | sed -e 's/abcd/a b c d/' ...
Hi,
echo "abcd" | sed -e 's/abcd/a b c d/'

Bye
1,931
Posted By sauron
So, data_type_SQL="|G |NRT |NRTW |" put...
So,

data_type_SQL="|G |NRT |NRTW |" put double quotas
so you'll got
echo $data_type_SQL
|G |NRT |NRTW |

localty=$(echo $data_type_SQL | cut -d\| -f2| sed -e 's/|//g')
# echo $localty
...
23,616
Posted By sauron
Hi erenay, i think you forgot a thousand of...
Hi erenay,
i think you forgot a thousand of (") and(;) and spaces:

while read line do
if [[$line = *sometext*]] then echo $line fi
done < $FILENAME

must be:

while read line; do...
1,931
Posted By sauron
Hi, i don't understand why you need to use: ...
Hi,
i don't understand why you need to use:
localty=$(echo " |$LOC_TYPE|$LOCATION_ID|$WAREHOUSE|" | cut -d\| -f2)

when you can use
localty=$(echo "$LOC_TYPE")
etc
1,931
Posted By sauron
Hi , where do you assign a value to: ...
Hi ,
where do you assign a value to:
$LOC_TYPE
$LOCATION_ID
$WAREHOUSE

? i'm a bit confused
1,763
Posted By sauron
Hi, bash tells you "command not found" because...
Hi,
bash tells you "command not found" because you typed [-f ... without spaces,
anyway the option "-f" check a single file so even if you write the if statement the right way, the code you posted...
1,985
Posted By sauron
Hi, mordor:/# data_LocID_SQL="|NTTR |" ...
Hi,

mordor:/# data_LocID_SQL="|NTTR |"
mordor:/# echo $data_LocID_SQL | sed -e 's/|//g'
NTTR

maybe you are using again the variable without reassign it

you got "data_LocID_SQL" that is...
1,985
Posted By sauron
can you post me what yuo typed? it is hard to...
can you post me what yuo typed?
it is hard to help without seeing your code

if you put the command i told you into a variable, it works

Bye
1,985
Posted By sauron
Hi, try this: echo $YOURVARIABLE | sed -e 's...
Hi,
try this:
echo $YOURVARIABLE | sed -e 's /|//g'

Bye
1,763
Posted By sauron
Hi, you tried something? Or should us write...
Hi,
you tried something? Or should us write the script for you?
I assure you it is very simple, and think if you try you can manage it.
There's no help if we write the script for you, because you...
1,931
Posted By sauron
Hi, echo the reply from DB ...
Hi,
echo the reply from DB

local_ty=$(echo " |locationtype|locationID|warehouse|" | cut -d\| -f2)
local_id=$(echo " |locationtype|locationID|warehouse|" | cut -d\| -f3)
wareH=$(echo " ...
1,208
Posted By sauron
hi, cat -n file > file2 Bye
hi,
cat -n file > file2

Bye
37,019
Posted By sauron
hi, if you want to know if the package is in...
hi,
if you want to know if the package is in the repository
try
apt-cache search build-essentials

apt is powerful, lern how to get the best from it

man apt will help

Bye
1,465
Posted By sauron
i think this shuld work ls -lrt | egrep "(...
i think this shuld work

ls -lrt | egrep "( _09_04_2009_|_10_04_2009_)"

If i understood :D

Bye
3,139
Posted By sauron
hi, what about permissions? it is better in...
hi,
what about permissions?
it is better in crontab to specify the user who gotta do the job:

10 00 1 * * * root /home/oracle/remtrc > /tmp/cleantrc.log

Bye
1,465
Posted By sauron
hi, just a question, why writing a script when...
hi,
just a question, why writing a script when you can us "ls -lrt" ?
Maybe i didn't understand what you need, can you explain it better?

Bye
17,751
Posted By sauron
Hi, try using perl perl -pi -e...
Hi,
try using perl

perl -pi -e 's/__CHANGEME__/'$var1'/' testfile

Bye
4,117
Posted By sauron
Hi, if you know the name of the command...
Hi,
if you know the name of the command freezing your pc, you can use "killall <command>", it sends a kill -15 to all the pids of the command.
But i think the best is to discover why that process...
4,132
Posted By sauron
Ok if i understand, you must match %checksum and...
Ok if i understand, you must match %checksum and comment it then the next line must be commented too?
You may try this:

awk '/%checksum/ {
print "#"$0;getline;
...
Showing results 1 to 25 of 31

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