Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
Hi Josh, its probably too late to ask this question. However i am facing this problem currently. Could you let me know that how to see/remove these invisible characters. are ...
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Posts
    4

    Problem after moving script from windows to linux

    Hi Josh,

    its probably too late to ask this question.

    However i am facing this problem currently.

    Could you let me know that how to see/remove these invisible characters.

    are you using a tool other than VI?
    Please help me out in running my scripts.
    Thanks.

    Aamer

    Quote Originally Posted by kornork View Post
    Final Followup:

    I have to assume the problem with the scripts was from moving them from the other UNIX box - presumably there were some invisible characters after the first line that were causing problems or something (because I could copy the scripts from one terminal window to the other - and then they would work).

    As for the nohup, after I had ensured that the script, in it's entirety, without error from the perl script it called, worked, the nohup command seemed to function fine.

    -Josh

  2. #2
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,090
    Welcome to the forums, Aamer!

    Hey, I've moved your post to create a new thread because the one you replied to was almost 4 years old already. Don't hesitate to add any additional details that might be needed for someone to help with solving the problem that you are experiencing.
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  3. #3
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    probably it has ms-dos line ending characters, you need to use the dos2unix utility to convert it

  4. #4
    Just Joined!
    Join Date
    Dec 2009
    Posts
    4
    Thanks Ozar,

    coopstah13,

    I don't know even what you mentioned dos2unix.

    My simple problem is: i ftp my running script from linux to windows and then to other linux box.

    But my script is not working showing different errors.

    Please let me know the solution and pls also how to coz i am have been just moved to this section.?

    Thanks
    Aamer

  5. #5
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,090
    It will be helpful to those that try to offer assistance if you can post any error messages that you are receiving.
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  6. #6
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    do you have ssh access to the box? there should be a command called dos2unix you can use to convert from ms-dos format file

    if not you will have to do it on the machine you are uploading from, probably you can do it in a cygwin environment on the windows box

    if you are choosing to do it from linux, most likely you will have to install the dos file utilities, what you need to install depends on your distro

  7. #7
    Just Joined!
    Join Date
    Dec 2009
    Posts
    4
    Hi,

    I tried dos2unix file1.sh file2.sh which was successful but when i tried executing the script it closed the ssh.

    Thenk even i tried running my ksh script locally on ported linux box but my terminal was again closed. please help me out.

    whereas i don't know about cygwin environment. can you please explain.

    Aamer

  8. #8
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    does your script have exit in it? possibly it is closing the connection, I don't know what your script does so I can't tell you

    cygwin provides a unix like environment on windows, a lot of the gnu tools are compiled as windows executables, and work similarly

  9. #9
    Just Joined!
    Join Date
    Dec 2009
    Posts
    4
    Hi coopstah13,

    There is no exit statement in script.

    However lot of thanks for your time and support.

    I am currently downloading cygwin.

    if possible, pls let me know a particular example of converting a script in cygwin.

    Thanx.

    Quote Originally Posted by coopstah13 View Post
    does your script have exit in it? possibly it is closing the connection, I don't know what your script does so I can't tell you

    cygwin provides a unix like environment on windows, a lot of the gnu tools are compiled as windows executables, and work similarly

  10. #10
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    i'm not sure if it is installed by default or not, but you need to just use dos2unix, its pretty easy, just dos2unix <file>

Page 1 of 2 1 2 LastLast

Posting Permissions

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