There are more files than above, but I hope you understand what I'm trying to do here.
Is there a way I can create a loop to compare:
file001 with file385
file002 with file386
file003 with file387
I tried a nested loop, but all it did was compare file001 with file385, file386, file387.
Then is compared file002 with file385, file386, file387,,,etc.
I just want two sets of ranges compared in parallel
I am having a problem I think is similar to this one. I recently started a new class and I am way behind and I do not have a clue. I got one class with powershell ISE which that one I have ok I can get the work but for this shell and scripting class I am lost. I found a script but it only opens one file so I don't know what to do with that. I DL Fedora virtual OS on USB and I am running that then i used the terminal to install kornshell:) I ran this code I found and changed the name to testfile 1 and test file2 but I can only get it to read one file.
I used this code that I found here
#!/bin/ksh
file="/path/to/file.txt"
# while loop
while IFS= read -r line
do
# display line or do somthing on $line
echo "$line"
done <"$file"
and I tried to change it by adding
echo "$line" twice and changing
(while IFS= read -r line)
to
while IFS= read -r line1
IFS= read -r line2
but it does not work anymore. I will add the assignment details as well
I have never done this before but I think I can learn it, I think it has something to do with echo and if I can add both files to that part, I read something about arrays too but I am not sure that will apply here. If I take off line and add the file name instead will that change the outcome?
comparing file_1 with file_11
comparing file_2 with file_12
comparing file_3 with file_13
comparing file_4 with file_14
comparing file_5 with file_15
comparing file_6 with file_16
comparing file_7 with file_17
comparing file_8 with file_18
comparing file_9 with file_19
comparing file_10 with file_20