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 gkittelson 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: mhbjr
  • Order by date
  1. mhbjr

    Compare file1 and file2 replacing field in f2 ignoring case

    Thanks all, I was able to solve the problem. What I didn't know until I debuged it with the sh -x command is that when I move the data from the file to a variable i get the data\r So I solved it with the following command. for i in `<file1 awk '{$1 == "FieldName:"} print $2}' | awk...
  2. mhbjr

    sed in a for loop

    Thanks I finally figured it out. When I get the data from the file into $i it has the \r on the end of the data ex. "loan_dt\r" cannot see this with any editor finally found it by doing sh -x to debug the shell. Didn't know that command. I fixed it by running it through another awk...
  3. mhbjr

    sed in a for loop

    I need help! I am trying to use sed in a for loop and does not seem to be working correctly. If I have a file called file2 that contains: Field: LOAN_DATE and I do: i="loan_date" sed -i "s/${i}/${i}/I" file2 This works replacing LOAN_DATE with loan_date The problem is when I put this in a...
  4. mhbjr

    Compare file1 and file2 replacing field in f2 ignoring case

    Thought of it but needs to be idential to File1 which can be a mix of upper and lower.
  5. mhbjr

    Compare file1 and file2 replacing field in f2 ignoring case

    Thanks for any help. I have 2 files and I am reading in the second file and reformating it with output going to a third file. My problem is I need to read the first file and compare with second file and if data in a field matches I need to replace it with the data from the first file. The...

Part and Inventory Search

Back
Top