Was wondering if it was too stupid and got deleted? Because it's gone now from the board.
I was asking about For Loops ----?
#!/usr/bin/bash
bank=`cat /export/home/usr/banklist.txt`
cdir=`cat /export/home/usr/mountlist.txt`
for d in $cdir
do
ls -l /apps/data/custdata/$d/$i/incoming/
ls -l /apps/data/custdata/$d/$i/outgoing/
for d in $bank
do
ls -l /apps/data/custdata/$d/$i/incoming/
ls -l /apps/data/custdata/$d/$i/outgoing/
done;
done;
The question was asking how to fill in the variables from two different lists of files and when they match peform an action ls -ltr for example?
If this gets deleted it must mean I need to go to the Unix for dummies thread?
Sorry. We had a technical problem yesterday and lost the database. We restored a backup, but we lost a couple of hours of posts.
I don't understand your question, but you show two "for" loops, one nested inside the other. No problem there. But both are using the same variable d. The inner loop needs its own variable.
So I need something like if $a and $b exist at the same time, then do
ls -l /apps/data/custdata/$a/$b/incoming/
ls -l /apps/data/custdata/$a/$b/outgoing/
The problem being soemtimes there will be an /apps/data/custdata/1/d/incoming/ directory but there will be also times when an /apps/data/custdata/3/f/incoming/ won't exist --- I want to do an ls on the two combos from the two different list files that match?
The second post in this thread is spam. All of the other posts that I looked at by the same user are also spam.
https://www.unix.com/shell-programming-scripting/152728-using-grep-returns-partial-matches-i-need-get-exact-match-nothing.html
Don't know if the individual reply can be scratched,... (2 Replies)
Discussion started by: agama
2 Replies
3. Forum Support Area for Unregistered Users & Account Problems
Hi, I joined yesterday and posted a thread and received emails from people suggesting solutions. My problem is that when I tried to access my posting this morning by clicking on the link in an emial, it said I wasn't registered and I had to re-register and I can't find my posting. The emial I... (1 Reply)
to the moderators of this site...
i posted a question several weeks ago about a egep -e if you look through my posts you will see that my question was fully plausible as a reasonable post that could have been answered even it was to say that I should search the man pages myself and find the... (4 Replies)