Find the answer to your Linux question:
Results 1 to 1 of 1
I have some problem to identify the newest filename entered which means the last arguments for the script. Problem is as below:- Code: echo "Newest filename is : $tmp" For ...
  1. #1
    Just Joined!
    Join Date
    Oct 2007
    Posts
    8

    How to get the newest filename from the while loop?

    I have some problem to identify the newest filename entered which means the last arguments for the script. Problem is as below:-
    Code:
    		echo "Newest filename is : $tmp"
    For example,
    ./script1 file1 file2 file3
    Output:

    Filename [1] is : file1
    Filename [2] is : file2
    Filename [2] is : file3
    Newest filename is : <no output>

    Any idea I can fix my code ?

    Full Code
    Code:
    solved
    Last edited by kahpeng; 10-07-2007 at 01:22 PM. Reason: Solved

Posting Permissions

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