Professional Web Applications Themes

trimming a file but got error? - Linux / Unix Administration

when i trim a file, i have this error "Invalid null command." i can do it with root, with shell ksh. but when i am switch to other user, i get the above error and that user shell is csh. the file belongs to the switch user. any ideas?...

  1. #1

    Default trimming a file but got error?

    when i trim a file, i have this error "Invalid null command."
    i can do it with root, with shell ksh. but when i am switch to other
    user, i get the above error and that user shell is csh. the file
    belongs to the switch user.

    any ideas?
    yls177 Guest

  2. #2

    Default Re: trimming a file but got error?



    yls177 wrote:
    > when i trim a file, i have this error "Invalid null command."
    > i can do it with root, with shell ksh. but when i am switch to other
    > user, i get the above error and that user shell is csh. the file
    > belongs to the switch user.
    >
    > any ideas?
    The simple answer is to use whatever shell you wish. If you had posted
    the
    command you are using, someone could give you a better answer.

    Speaking only for myself,

    Joe Durusau


    joe durusau Guest

  3. #3

    Default Re: trimming a file but got error?

    yls177 wrote:
    >
    > when i trim a file, i have this error "Invalid null command."
    > i can do it with root, with shell ksh. but when i am switch to other
    > user, i get the above error and that user shell is csh. the file
    > belongs to the switch user.
    That error message is from the shell layer of the onion. Conclusion
    is you have a scripting error. Some variable expands to nothing in
    csh that expands to something in ksh, some ksh function being used
    that isn't implemented in csh, etc. Since you don't include either
    the source code for the ksh and csh commands, nor do you include
    the "-x" output, it is doubtfull folks will be of further help.
    Post away with that further data.
    Doug Freyburger Guest

  4. #4

    Default Re: trimming a file but got error?

    In article <c06e4d68.0404272047.4a9d8b56posting.google.com >,
    [email]yls177hotmail.com[/email] (yls177) wrote:
    > when i trim a file, i have this error "Invalid null command."
    > i can do it with root, with shell ksh. but when i am switch to other
    > user, i get the above error and that user shell is csh. the file
    > belongs to the switch user.
    Are you trying to use the command:
    > filename
    That is valid syntax in shells based on Bourne shell syntax, but it's
    not valid in C shell. Use:

    cat /dev/null > filename

    --
    Barry Margolin, [email]barmaralum.mit.edu[/email]
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
    Barry Margolin Guest

  5. #5

    Default Re: trimming a file but got error?

    On 27 Apr 2004 21:47:30 -0700, yls177
    <yls177hotmail.com> wrote:
    > when i trim a file, i have this error "Invalid null command."
    > i can do it with root, with shell ksh. but when i am switch to other
    > user, i get the above error and that user shell is csh. the file
    > belongs to the switch user.
    >
    > any ideas?
    How are you trimming the file? If you are using "> file", that is not a
    valid csh command. You could do ": > file", or as root,
    "> file; chown user file".

    --
    Giraffe: a ruminant with a view.
    Bill Marcum Guest

  6. #6

    Default Re: trimming a file but got error?

    Bill Mar <bmariglou.com.urgent> wrote in message news:<tps4m1-v9q.ln1don.localnet>...
    > On 27 Apr 2004 21:47:30 -0700, yls177
    > <yls177hotmail.com> wrote:
    > > when i trim a file, i have this error "Invalid null command."
    > > i can do it with root, with shell ksh. but when i am switch to other
    > > user, i get the above error and that user shell is csh. the file
    > > belongs to the switch user.
    > >
    > > any ideas?
    >
    > How are you trimming the file? If you are using "> file", that is not a
    > valid csh command. You could do ": > file", or as root,
    > "> file; chown user file".


    yup.. i got the point.. thanks for replying.
    yls177 Guest

Similar Threads

  1. trimming a string
    By coolidge in forum Coldfusion - Getting Started
    Replies: 6
    Last Post: September 29th, 04:17 PM
  2. trimming a string either side of a keyword
    By ceaseanddesist in forum Dreamweaver AppDev
    Replies: 4
    Last Post: May 31st, 08:16 AM
  3. trimming arcs/ellipses
    By Tonybob21 in forum Macromedia Freehand
    Replies: 3
    Last Post: July 10th, 05:18 PM
  4. Trimming Whitespace
    By Sean Levesley in forum Macromedia Director Basics
    Replies: 3
    Last Post: August 22nd, 10:17 PM
  5. trimming a variable.
    By mario c in forum ASP
    Replies: 2
    Last Post: July 21st, 11:37 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139