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 Wanet Telecoms Ltd 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. huangwason

    can not boot to XP after Fedora installation

    ...-f [root@localhost /]# fdisk -l Disk /dev/sda: 60.0 GB, 60011642880 bytes 255 heads, 63 sectors/track, 7296 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x8dc044c2 Device Boot Start End Blocks Id System /dev/sda1 * 1...
  2. huangwason

    save a remote screenshot

    thanks LKBrwnDBA.
  3. huangwason

    save a remote screenshot

    Hi I want to save a remote screenshot from my local PC. For example, I have a target with IP 10.0.100.1, if I login in via ssh to this target, I could save the screenshot by command DISPLAY=":0.0" import -window root screenshot.png or xwd -out -root -display :0.0 screenshot.xwd Now I do not...
  4. huangwason

    pass a python variable to subprocess

    Thank you very much, I will consider that use a complete python script for the object.
  5. huangwason

    pass a python variable to subprocess

    I am thinking about a python script to generate a xml file from a csv file, every row in csv is an element for the generated xml file. In order to obtain file value in csv file, I used awk. In example for i in range(int(total_line)): elementName=os.popen("awk -F ':' 'NR==a {print $5}'...
  6. huangwason

    change texts in a range using sed

    thank you
  7. huangwason

    change texts in a range using sed

    Thanks your guys, I tired PHV's scripts, it works for most of my XML files, but <message> <location filename="../code/a_mes/ccapp_mes_qt_measurementapp.cpp" line="1824"/> <source>Patients starting...</source> <translation>Abriendo el &quot; Registro de Pacientes&quot...
  8. huangwason

    change texts in a range using sed

    Yes feherke, they are character entity, such like <translation > THE MARKED PATIENT RECORD &APOS;%1&APOS; WAS NOT READABLE. </translation> in this case, &APOS shouldn't be changed
  9. huangwason

    change texts in a range using sed

    Thank you very much PHV, it works fine. Here you use "toupper" function to change lower case to upper case, I used some ascii codes in the XML file, when change to upper case, these ascii codes should reserve, can you propose how to reserve ascii codes in this case?
  10. huangwason

    change texts in a range using sed

    ...</TS> I will change the element contents between the tag <translation> from lower case to upper case. I intend to use Sed sed -e '/<translation*>/ s/\(.*\)/\U\1/' -e '/<\/translation>/,$ s/\(.*\)/\U\1/' input.xml some problems: 1) it changes the tag to upper case as well(<TRANSLATION>)...
  11. huangwason

    logical operator precedence

    thanks for your guys quickly reply, it works.
  12. huangwason

    logical operator precedence

    To check a file, if it does not exit, assign a value to exit code and print out something, I use the following code: [ -f $FILE ] || EXIT_CODE=1 && echo "$FILE does not exist" assure $FILE does not exist, the above logical operator can be regarded as: (False || TRUE) && TRUE EXIT_CODE is...
  13. huangwason

    how to call an alias command

    I alias a command such as alias ll="ls -l --color=auto" in my .bashrc file, now I would like to call this alias ll command via a script, but it can not find this alias command, is there a solution for this problem? Thanks
  14. huangwason

    how to manipulate more than one variables in a loop

    ...in the for loop, and print the second variable when it accumulate. Thanks again. A piece of code looks like let m=1 for ((j=1;j<=$16;j++)); do for ((k=0;k<4;k++)); do printf "%x " 4$(echo "(48+$i*2)+$k*2" | bc) done [ $m -le 195 ] && printf "%x " $m let m+=2 done
  15. huangwason

    how to manipulate more than one variables in a loop

    thanks PHV, but it does not match my requirment, I can not obtain the output such as 400 202 402 204 404 206 208 210 212
  16. huangwason

    how to manipulate more than one variables in a loop

    ...one variable manipulates digits begin with 4, another variable for digits begin with 2. for ((i=0,j=1;i<=2,j<=3;i++,j++));do printf "%s %s" 400+$i*2 200+$j*2 done the problem is that it looks like i and j are always in the same length, the above code can not output like 400 202 402 204...
  17. huangwason

    how to manipulate the loop by stdin

    Thanks, I use bash
  18. huangwason

    how to manipulate the loop by stdin

    Basically, any loop is ok as long as I could manipulate it. Here I only take an example.
  19. huangwason

    how to manipulate the loop by stdin

    I am going to write a loop, e.g for (i=1; i<=10; i++) do echo "do test $i" read done I would like to manipulate the loop manually. For instance, assume i=4 now, in the interval, when I press +, then perform next test 5, if I press -, then perform the previous test 3. How to fulfill it...

Part and Inventory Search

Back
Top