Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: cbsm
  • Order by date
  1. cbsm

    Replace a character in a variable

    Thanks - that was easy ...
  2. cbsm

    Replace a character in a variable

    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 !!!
  3. cbsm

    select rows that are not locked

    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...
  4. cbsm

    add hex value to text file

    Thank you ... but it did not work ... BEGIN: not found [No such file or directory] I tried without the BEGIN, and I get the same errors as before (`{' unmatched).
  5. cbsm

    add hex value to text file

    A few things a tried (no success) : 1. RDW="\x03\x32\x00\x00" LINE="t" echo "$RDW$LINE" > result.txt => adds \x03\x32\x00\x00t (all ascii) in result.txt 2. a=`cat hexfile` (or a=$(<hexfile)) sed `s/^/"${a}";/` < test.txt > result.txt where hexfile is a file with the hex value I need (created...
  6. cbsm

    add hex value to text file

    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 !
  7. cbsm

    copy from pattern to the enf of file

    Thanks ! awk solution doesn't seem to work. But sed did the job !
  8. cbsm

    copy from pattern to the enf of file

    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...
  9. cbsm

    filestream 'could nor find a part of the path'

    I used something like you suggested Moregelen. FileUpload fileUpload = (FileUpload)controlCell; HttpPostedFile myFile = fileUpload.PostedFile; int nFileLen = myFile.ContentLength; byte[] myData = new byte[nFileLen]; myFile.InputStream.Read(myData, 0, nFileLen)...
  10. cbsm

    filestream 'could nor find a part of the path'

    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...
  11. cbsm

    procedure performance

    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 !
  12. cbsm

    sed , awk to copy file from line starting with 'XXX'

    Thank you !
  13. cbsm

    sed , awk to copy file from line starting with 'XXX'

    OK ... didn't go very far ... I tried this : nawk '/RapproStkMat/{sub(/.*Title XXX/,"Title XXX");sub(/\(END XXX.*/,"");print;exit}' file.txt > NewFile.txt * awk didn't work at all, so I tried Nawk * result : in NewFile.txt Title XXX => I miss all the lines betwenn Title XXX and END XXX....
  14. cbsm

    sed , awk to copy file from line starting with 'XXX'

    Sorry - just found a similar thread. I'll try it out ...
  15. cbsm

    sed , awk to copy file from line starting with 'XXX'

    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...
  16. cbsm

    Save file

    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...
  17. cbsm

    delete line

    Basically, I do not know much about unix. I usually use the sed command. I know for example how to delete a line containing a pattern. But this case is a bit different and I have no idea how to start.
  18. cbsm

    delete line

    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 ...
  19. cbsm

    add text start every line

    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...
  20. cbsm

    Update value in same table

    got it ! update TEST set Price = (select t2.Price from TEST t2 where TEST.Date1 = dateadd(dd,+1,t2.Date1)) where Price=NULL

Part and Inventory Search

Back
Top