I know how to replace a character in a file (using grep for example).
What I need to do is to replace a character in a variable :
MyVar="abcd/ter/123"
and I need to replace "/" with "_"
(in the end I want MyVar="abcd_ter_123"
It's probably soooooo easy ... but I'm stuck ...
Thank you !!!
Hello,
I searched a lot ... maybe it is just not possible.
I 'd like to be able to do a select on a table on which another traitement is doing an update.
I do no want to be 'stopped' by the lock on the row that are beeing updated.
I do not want to select the lines that are beeing updated (It's...
Hello,
I have a txt file like this text.txt :
Line1
Line2
Line3
I need to add X’03320000’ (as hex value) at the begining of each line (it represent the size of the line - in my case each line is the same size - which should make things easier).
Has anyone an idea ?
Thank you !
Hello,
I'm sorry to post this probably very simple question ...
I need to copy from a file into another from the line with pattern '123' to the end of the file.
I know how to do it from pattern1 to pattern2 :
awk '/pattern1/,/Pattern2/' /${File1} >> ${File2}
but I need something like
awk...
I searched all afternoon - found lots of post here and there ... but error still here ...
I am trying to open a file (to store it in a database).
The error occurs here
FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read);
If I run it on my machine (local), and...
Hi,
a procedure (among others ...) is executed - every 10 mins.
Sometimes (nothing special happens) - the performance decreases (usualy takes less than 1 minute -> 6 minutes).
If I recompile the procedure - it works fine again.
Does anyone has an idea what the problem can be ?
Thank you !
Hello,
I am not very familiar with unix. I need to copy from file A to file B, everything between line reading 'Title XXX'
to line reading 'End XXX'.
(or if it is easier from line 'Title XXX' to the end).
file A :
AAAA
BBBB
Title XXX
CCCC
DDDD
End XXX
EEEE
I need file B:
Title XXX
CCCC
DDDD...
I know you're going to tell me this is a very bad idea - but I need to save (small) text files into my SQL Server (2005) database.
But I need to do it, and do not know how ...
I will never search for text in the file or things like this.
(I may have to 'recreate' the file - that's all)
1. What...
hello,
I have a .csv file (created by 'users'). I need to load this file in a database.
I'd like to 'prepare' the file, to avoid any problem during the load.
This is why I need to delete every line where there is nothing else than ; or spaces.
Example
a;b;c;d
;;;
; ;
;
e;f;g;h
should become ...
As you see with my question, I do not use unix script very often.
This is what i'd like to do :
I have a text file (.csv).
I want to add a few characters (";;;") at the start of each line :
test;abc;def
becomes
;;;test;abc;def
I tried different sorts of sed commands without any success.
for...
I am getting crazy !
I have a table like this:
Table TEST(
Date1 datetime,
Price float Null)
I fill the table with the days of the month.
And update the table with the right price for the day.
For some days, I do not have a price, and I want to get the price from the day before.
This sounds...
I am working with Sybase (sorry I do not konw the version, but can't be too old).
This is what I like to do
SELECT * FROM mytable
where myfield in CASE WHEN @Variable = 1 then ('test1')
WHEN @Variable = 2 then ('test2')
WHEN @Variable = 3 then...
Hello.
I am new to unix.
Using ksh.
I have this file in which I like to replace "CarRet" by a real carriage return ( or end of line or what ever it is).
ex :
Message1CarRetMessage2
should be
Message1
Message2
I tried a few things like :
sed 's\CarRet\/n\g' result : Message1/nMessage2
or...
Hello,
I have to write a very simple shell (I am not used to this at all).
I used grep to put a line from a file in a variable like so :
Suivi_Id=$(grep "Suivi_Id" ${FILE})
echo $Suivi_Id prints : Suivi_Id123
I want only 123
so I tried (and tried, and tried...)
for example ...
hello !
this is my very odd problem.
I have a Form (Order Header)
in this form a Subform (Order lines).
In the footer of the Subform - I calculate the number of item and the total amount.
(Sum(Items) and sum(item*price) )
Everything is fine when I create my Order.
The user can also look for...
Hi !
I am probably missing something very obvious here - but for now, I am just becoming crazy !
I am working on a VB6 application - talking to an Access2000 database.
I am used to this kind of application.
I worked with this specific one for about 1 year - wiht no trouble in this kind.
I've...
I am working in an environment where some users need to have American dates (mm/dd/yyyy), other european dates (dd/mm/yyyy).
The day is not important here (always first day of the month).
To compare two dates, I decided to get the year part, and the month mart - put them together : YYYYMM.
Now...
Hello !
Sorry this is going to be a very long post - but wanted to put as many info as possible.
I found on the net a way to add an horizontal scroll bar to a VB Listbox (works also for comboboxes).
This is were I found it :http://msdn.microsoft.com/msdnmag/issues/1200/combo/
It uses API calls...
Hi,
I need to copy to and from an ftp server - from Access.
I checked the site and found some helpfull posts.
So, I added and Inet control to a form and used the following code (sorry I do not remember from whom I took it).
Private Sub Command0_Click()
SetUpftp
DownloadFile
End Sub
Private...
I have several users, each one of them (almost) in another location.
Of course, the link is to slow betweenn every location to work from 1 file.
I have one access database as Back-End.
(Front-end is written in VB).
I heard about replica.
Users might not change data daily - but the day they make...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.