Getting exit status code from 'ftp' command in linux shell

后端 未结 6 1143
半阙折子戏
半阙折子戏 2020-12-28 23:08

I need to retrive the exit status code from a command line program. No worries, I used $?. But for ftp, even if it doesn\'t connect, it opens the ftp shell, so I\'m not able

6条回答
  •  时光说笑
    2020-12-28 23:28

    The last time I needed to use ftp in a script, I got so frustrated with it that I finally found a BSD-licensed ftp client source and simply modified it to give it the behavior I needed, and used that instead of the version provided with the OS.

    Ugly, but the depth of head-level dents in the cube wall was starting to get ridiculous

提交回复
热议问题