Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Smile Regarding sed command in C program

    I want to use a 2-dimensional array element in the sed command (using system() function) inside a C program. What should be the syntax for that..??

    I tried the following code but its showing an error.

    1. "system("sed -n '/"${ben[0][$j]}" s/h/"${string1[]}"/' parent > f"$i"");"

    2. "system(" sed -n '"${ben[0][$j]}" w temp' f"$i" ; temp1=$(awk '{printf $3}' temp) ; sed '/"$temp1"/s/"$bond0"/"$bond1"/' f"$i" ; rm temp");"

    Please help me out.

    Thank you in advance.

  2. #2
    Here $i, $bond0, $bond1 are all variables.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts