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 Mike Lewis 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: *

  1. merang

    Change content of files

    Ok..thanks for your time sir :)
  2. merang

    Change content of files

    Emm lets say the price is not added at the last but instead add in any place..so I need to change the example that u give in previous post because it assign <set year [lindex $line_list 2]>...I need to modify them like <set price [lindex $line_list 2]> so that I can print out the output of price...
  3. merang

    Change content of files

    Yes, because the loop is hardcode, it is fixed for that particular elements only..it is hard to change the elements in the loop everytime when there are changes in the input file. To make the code more robust, can u give me an example of the another method that you mentioned before?
  4. merang

    Change content of files

    Hi, i have refer to your code and tried my own code, and it works well. i see that this code is the HARDCODE. if i want it to become a SOFTCODE, as an example if another input file has other added elements beside the previous one (Device Type Year Status Company [highlight...
  5. merang

    Change content of files

    yes, it answers my question sir.. i have modified the code with my own code to fulfill the purpose of my question. for the header i use another command to set the header. is it possible to use the input file as the header? Device <blank space> Type <blank space> Year <blank space> Status...
  6. merang

    Change content of files

    set line_list [regexp -all -inline {\S+} $line], is this the code to detect the duplicate? Need to modify it so that can meet the purpose of this program? Or I need to come out with a new condition? Some example sir? Thanks in advance. .
  7. merang

    Change content of files

    OIC..sir,which part of the code that detect the same path and device, remove the duplicate and take only the last occurence? FYI the code should remove the duplicate if and only if the path and device are the same.. From the above example..we have 3 samsung right: electro/trend/latest/phone...
  8. merang

    Change content of files

    Tq for such a good explaination sir..one question, if some of the path is electro/trend/latest/phone and other path got electro/trend/latest/tech/hardware/phone, is the code still can be use sir? To get the device is phone only.. Thanks in advance :)
  9. merang

    Change content of files

    Hi all, i have a question to ask..i want to read an input file and write it to a new output file, the content of my input file as follows (not limited to these item only, can have up to hundreds items): Device <blank space> Type <blank space> Year <blank space> Status <blank space>...
  10. merang

    print output from array and foreach command

    Hi, i am new to tcl programming. i have one question about array. i store data from .txt files in an array call country. [highlight #EF2929]array set country {$food $place}[/highlight] where $food and $place is the data that i get from the .txt file. i want to display them so i do: foreach...
  11. merang

    tcl array problems

    hi feherka, thanks for such a good explanation. the expected output is as you wrote but the etc4 should be under etc3 and not under etc1.should be like this: master # tclsh netlist.tcl please enter the library name : etc1 etc1 etc2 3 if run again the program: please enter the library name ...
  12. merang

    tcl array problems

    Hi feherka, The given code is not working when i try to do a long list of file. Maybe because of the string range that you have specified in your code. Is it possible to do without array as the netlist is a complex data structure. It consist of many library name, for each library name got cell...
  13. merang

    tcl array problems

    Thanks man..I will try it first then will update with you on how it works..thanks again..
  14. merang

    tcl array problems

    For your info, in the netlist there are more than 30 different libraryname and cellname and also more than hundreds of instance. Can I use the code above for the netlist?
  15. merang

    tcl array problems

    Hi feherka.. Tq for your concern..actually my file is a netlist. The input file that I wrote is just an example on how the structure and how the netlist looks like.. The file looks like this **Library name : etc1 **cellname : etc2 .subckt etc2 (List of instance) .end etc2 **Library name ...
  16. merang

    tcl array problems

    Hi all..i have a problem regarding the use of array in tcl programming..i have a file like below: **user johny .subuser abu basikal runner 2008 new kereta honda 2005 second motor yamaha 2010 new .end abu ** edwind .subuser ahmad book himym 2007 second house ara 2013 new shoes nike 2014 new...
  17. merang

    tcl array problems

    Hi all..i have a problem regarding the use of array in tcl programming..i have a file like below: **user johny subuser abu basikal runner 2008 new kereta honda 2005 second motor yamaha 2010 new end abu ** edwind subuser ahmad book himym 2007 second house ara 2013 new shoes nike 2014 new...

Part and Inventory Search

Back
Top