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 strongm 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: huangwason
  • Content: Threads
  • Order by date
  1. huangwason

    can not boot to XP after Fedora installation

    Initially I had XP system, and I installed Fedora 11 using live cd, after installation, I do not see XP boot menu, after changing /boot/grub/menu.lst a little, Grub menu appears, but every time I select XP, system still in grub and can not boot to XP. My menu.lst # grub.conf generated by...
  2. 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...
  3. 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}'...
  4. huangwason

    change texts in a range using sed

    Hello, guys, I am thinking about a script that can change element contents of a specified tag in xml file. For example: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE TS> <TS version="2.0" language="en_GB"> <context> <name>ezono::ccapp::bup::BiosUpgrade</name> <source>Failed to...
  5. 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...
  6. 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
  7. huangwason

    how to manipulate more than one variables in a loop

    for instance, print out something like: 400 202 402 204 404 206 ... what I am thinking is use 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...
  8. 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...
  9. huangwason

    how to assign a batch of variables

    I am trying to assign such as a1=1, a2=2, ... , a8=8, and I wrote a script such like for (( b=1; b <= 8 ; b++ )) do a$b=$b echo $(a$b) done the output as ./for-loop.sh: line 6: A1=1: command not found ./for-loop.sh: line 7: a1: command not found what is the problem?

Part and Inventory Search

Back
Top