Search Results

Search: Posts Made By: strike
18,322
Posted By strike
how would u use this to remove every line that...
how would u use this to remove every line that has the charater "*" in it?
4,303
Posted By strike
thanks for that, it does help.
thanks for that, it does help.
4,303
Posted By strike
thanks for that, that was quite informative. ...
thanks for that, that was quite informative.
just wandering how would that script be modified if say there
were multiple arguments?
e.g
arguments "t:w"
if theres no -t
do something
else
...
4,303
Posted By strike
arguments expected error
ive implemented getopt for the command line but have this problem,

#!/bin/sh
text=""
set -- getopt "t" etc .... #sets arguments
while :
do
case "$1" in #gets arguments...
18,322
Posted By strike
/bin/echo "/$line/d\nwq!" | ex -s file.txt ...
/bin/echo "/$line/d\nwq!" | ex -s file.txt

ive noticed that this only removes one instance of "$line",
how would you remove all instances of $line from the file?
18,322
Posted By strike
oh interesting. thanks
oh interesting. thanks
18,322
Posted By strike
yep that works. i was just curious why does...
yep that works. i was just curious
why does this work
/bin/echo "/$line/d\nwq!" | ex -s file.txt
but not this?
echo "/$line/d\nwq!" | ex -s file.txt
18,322
Posted By strike
just wandering, is there a way to delete the line...
just wandering, is there a way to delete the line out of "file.txt" without having to redirect it to a "new_file.txt" , or do we have flush "file.txt" and copy "new_file.txt" into it?
56,033
Posted By strike
thanks for that
thanks for that
56,033
Posted By strike
adding float numbers
how to add 2 float values to each other?
i tried this and it doesnt work:
#!bin/bash
numone=1.234
numtwo=0.124
total=`expr $numone + $numtwo`
echo $total
thanks
5,550
Posted By strike
thanks for that
thanks for that
5,550
Posted By strike
unix join !
just wandering if anyone knows what kind of algorithm unix join
command is using to join 2 files.
Thanks!
8,313
Posted By strike
ahhh BINGO!
ahhh BINGO!
8,313
Posted By strike
oh yes, it is linked to gawk i just checked ... ...
oh yes, it is linked to gawk i just checked ...
but the result still remains the same.
8,313
Posted By strike
hmmz strange, im using SunOS as well and mktime...
hmmz strange, im using SunOS as well and mktime is defined,

the first code returns "1102738530" (which is correct)

where the second code returns "-1"

strange indeed. :(
8,313
Posted By strike
Problem with time
(let me re-edit my question)

This works
#!/bin/sh
awk 'BEGIN {print mktime("2005 07 01 34 30")}
This doesnt
#!/bin/sh
TIME="2005 07 01 34 30"
awk 'BEGIN {print mktime($TIME)}
what could be...
3,178
Posted By strike
try using var1=`grep "update process"`
try using
var1=`grep "update process"`
23,917
Posted By strike
wow, works like a charm now, thanks for that :)
wow, works like a charm now, thanks for that :)
23,917
Posted By strike
ok i fixed the error, this is exactly what i...
ok i fixed the error,
this is exactly what i tried...
#!/bin/sh
FILE="somefile"
SOMESTRING="some string"

sed "/${SOMESTRING}/,\${/hello there/p;}" ${FILE} | while read text_line; do
echo...
23,917
Posted By strike
i just tried using that and i get this error ...
i just tried using that and i get this error
sed: -e expression #1, char 58: Unknown command: `4'
strange indeed ...
23,917
Posted By strike
thanks for that, just curious what does the ",$p"...
thanks for that, just curious what does the ",$p" do?
also i tried combining "sed" with "grep" in this example;
#!/bin/sh
SOMESTRING="some string"

sed "/${SOMESTRING}/,$p" ${FILE} | grep "hello...
23,917
Posted By strike
got another question, say i wanted to do the same...
got another question, say i wanted to do the same thing but i wanted to start reading from a file starting from a line that contains a certain string, how can i do so?


#!/bin/sh...
47,417
Posted By strike
ohh i think it must be a problem with the file im...
ohh i think it must be a problem with the file im trying to read,
i just tried

/home/test >echo "gives Me Output Like This" | awk '{print $1 " " $2 " " $3}'

and it works fine. thanks :)
47,417
Posted By strike
strange well im outta ideas ... :(
strange well im outta ideas ... :(
47,417
Posted By strike
hmmzz, very strange indeed are u using bourne...
hmmzz, very strange indeed
are u using bourne shell for that script?
Showing results 1 to 25 of 32

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