<div dir="ltr">I understand needing help and I am not running you down in any way.<div><br></div><div>When I was a newbie, a long time ago, I learned to read the man page on commands. I learned a lot of interesting things from reading the page. As for me I remember much more if I do the work first. Some man pages are kind of cryptic in nature. Then I would google for what I needed, like: How to tar a file in unix. </div><div><br></div><div>I keep an archive of how2xxx. They are just command lines that I used with a few notes.</div><div>As an example I have a file named how2awk it has examples of how I did it.</div><div><br></div><div>Here is an example: of <span style="color:rgb(0,0,0);font-family:monospace">how2foreach </span></div><div><br></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">____in csh_______________________________________
</span><br>#!/bin/csh
<br>set infile = "./main_servers"
<br>foreach abc ( `cat $infile` )
<br> echo "---------------------"
<br> echo "$abc"
<br> rsh $abc 'ls /opt/SUNWexplo'
<br>end
<br>
<br>_____in bash_______________________________________
<br>#!/bin/bash
<br>## path to input file <br>input="lists.txt"
<br> <br>## Let us read a file line-by-line using while loop ##
<br>while IFS= read -r line
<br>do
<br> printf 'Working on %s file...\n' "$line"
<br>done < "$input"</span></div><div><div><span style="color:rgb(0,0,0);font-family:monospace"><br></span></div><div><span style="color:rgb(0,0,0);font-family:monospace">I worked in csh most of the time so a lot of my examples are for csh, this one has both csh and bash examples. They work in SUN os 4.4 through Solaris 10 I have not tried to run the commands in Ubuntu yet but I am sure it would.</span></div></div><div><span style="font-family:monospace"><br>
This is just a few things to think about. I have to ask my sone a lot of questions about how to do things in Linux. Linux is much easier to learn than Solaris was. You can do a lot of stuff with GUIs but if you want job security learn to do admin by the command line. </span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">Joe</span></div><div><span style="font-family:monospace">P.S.</span></div><div><span style="font-family:monospace">If you keep good notes of what you did and how to do it, you will never have to rewrite code, just modify what you already have.</span></div></div>