Search Results

Search: Posts Made By: user_invalid
1,322
Posted By user_invalid
Much appreciated. Starting to get to grips with...
Much appreciated. Starting to get to grips with all this
1,322
Posted By user_invalid
If I don't include g will only the first instance...
If I don't include g will only the first instance be changed?
Essentially I want to change:

INSERT INTO PH1_TX_LOAD VALUES ('TX-78731-AABSS:4182-4','RH: GUIDE TO...
1,322
Posted By user_invalid
Another substitution problem
Hello again,

I'm trying to change the following line:


INSERT INTO PH1_TX_LOAD VALUES ('TX-78731-AABSS:4182-4','RH: GUIDE TO TENNIS',TO_DATE('18-JUN-2001:00:00:00',...
3,184
Posted By user_invalid
Sorry to bring this up again. What does the \1...
Sorry to bring this up again. What does the \1 mean in the substituted string in the following code? :


sed "s/'\([0-9][0-9]*\)'/\1/g"


Also why is it necessary to use two [0-9] for the...
3,184
Posted By user_invalid
Thanks that does work
Thanks that does work
3,184
Posted By user_invalid
It doesn't appear to take out the quotation e.g.:...
It doesn't appear to take out the quotation e.g.:


INSERT INTO PRICE VALUES
('100871',4.8,3.2,TO_DATE(2447528,'J'),TO_DATE(2447862,'J'))
go



still is the same
3,184
Posted By user_invalid
sed "s/'\([-+]\{0,1\}[0-9][0-9.]*\)'/\1/g" file...
sed "s/'\([-+]\{0,1\}[0-9][0-9.]*\)'/\1/g" file works but i was wondering why the other sed command gives me the following error:


sed "'s/\'([0-9][0-9]*)\'/$1/g'" newscript2

Unrecognized...
3,184
Posted By user_invalid
Thanks, I get the error: syntax error at...
Thanks, I get the error:

syntax error at line 2: `(' unexpected

also can I ask why `sed 's/\'([0-9])*\'/$1/g' input file` would not work?
3,184
Posted By user_invalid
Substitution with sed
I have a file with some numbers having single quotes around them which I want to remove.

i.e. '923930' -> 23930

If it can be done without using sed thats fine. I have tried with sed but...
1,977
Posted By user_invalid
Thats correct. It does actually work, I was just...
Thats correct. It does actually work, I was just using the wrong input file
1,977
Posted By user_invalid
Excellent, that works. Thanks anurag ...
Excellent, that works. Thanks anurag

---------- Post updated at 10:54 AM ---------- Previous update was at 10:15 AM ----------

Just a final note on this, the replaced string needs to be...
1,977
Posted By user_invalid
Thanks, that works for the most part although...
Thanks, that works for the most part although -2400000 seems to be replaced in strange places and the calculation hasn't been done eg:

INSERT INTO PRICE VALUES -2400000
...
1,977
Posted By user_invalid
Thanks for the reply. I'm not sure if awk works...
Thanks for the reply.
I'm not sure if awk works on this system, I get the errors:
awk: syntax error near line 1
awk: bailing out near line 1

even awk {print $0} doesn't seem to work
1,977
Posted By user_invalid
Performing a calculation on string to be replaced
Hi,

I have a file with occurances of the string "TO_DATE(<number here>,'J')" at random places. I need minus 2400000 from the number and replace the string with "convert(date, dateadd(dd, <new...
2,656
Posted By user_invalid
Sorry for the late reply. Thanks for all that it...
Sorry for the late reply. Thanks for all that it really helps and my bash scripting is coming along great now, learning so much everyday its a great feeling. I'm sure I'll be back at some point with...
2,656
Posted By user_invalid
Thank you very much, that works great now. One...
Thank you very much, that works great now.
One more question, I don't quite understand why this line is used:
echo $owner | grep ${perm} > /dev/null

Why are curly brackets used and why is the...
2,656
Posted By user_invalid
Ahh I see. I suppose another way would be to use...
Ahh I see. I suppose another way would be to use loads of if statements then?
2,656
Posted By user_invalid
Permissions script
Hi there,

I've been having some frustrating problems with a permissions script. Basically I want it to to determine what permissions the owner, group and everybody has for the file passed in....
Showing results 1 to 18 of 18

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