+ Reply to Thread
Results 1 to 8 of 8

Thread: read file with if argument.....

  1. #1
    Programmer kiddies is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    128

    read file with if argument.....

    hey master, i wanna ask about read file with if argument, couse i always get script for read file with while argumrnt...

  2. #2
    Super Moderator WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther's Avatar
    Join Date
    Jul 2006
    Age
    37
    Posts
    12,912
    Blog Entries
    57

    Re: read file with if argument.....

    Can you give an example of what you're talking about?
    CodeCall Blog | CodeCall Wiki
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  3. #3
    Programmer kiddies is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    128

    Re: read file with if argument.....

    value=0;

    while read line
    do
    value=`expr $value + 1`;
    echo $value;
    done < "myfile"

    echo $value;
    i will make this with if argument...can u change it...

  4. #4
    Super Moderator WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther's Avatar
    Join Date
    Jul 2006
    Age
    37
    Posts
    12,912
    Blog Entries
    57

    Re: read file with if argument.....

    You'll need some kind of loop... I'm still not clear on what you're trying to accomplish.
    CodeCall Blog | CodeCall Wiki
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  5. #5
    Programmer kiddies is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    128

    Re: read file with if argument.....

    ok, i cannot understand in shell script sir...

  6. #6
    Super Moderator WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther's Avatar
    Join Date
    Jul 2006
    Age
    37
    Posts
    12,912
    Blog Entries
    57

    Re: read file with if argument.....

    What are you trying to do?
    CodeCall Blog | CodeCall Wiki
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  7. #7
    Programmer kiddies is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    128

    Re: read file with if argument.....

    just wanna learn n make it work well...

  8. #8
    Super Moderator WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther's Avatar
    Join Date
    Jul 2006
    Age
    37
    Posts
    12,912
    Blog Entries
    57

    Re: read file with if argument.....

    When writing software, the first step is to think in terms of "What are my inputs, what are my outputs?" You then write processing to get from your inputs to your outputs.

    What you have given is the processing, but neither the inputs nor the desired outputs. Based on that, I cannot help you because I don't know the purpose of the code you wrote, what it's supposed to do, or why it is inadequate.
    CodeCall Blog | CodeCall Wiki
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Creating an Executable Jar File
    By TALucas in forum Java Tutorials
    Replies: 21
    Last Post: 07-16-2010, 06:13 AM
  2. Replies: 2
    Last Post: 07-16-2009, 11:48 AM
  3. Java: encrypt text into an image
    By Sinipull in forum Classes and Code Snippets
    Replies: 0
    Last Post: 06-16-2009, 12:59 PM
  4. Regex and preg match?
    By phpforfun in forum PHP Forum
    Replies: 6
    Last Post: 05-30-2009, 05:25 PM
  5. Needing a real help :(
    By Moody_87 in forum C and C++
    Replies: 9
    Last Post: 03-17-2009, 05:12 PM