How to skip the first line of the script in shell using python?

How to skip first line of the script in shell, using python.

If you're working with a file object in python, just use the readline method and don't use the return value.

If that doesn't apply, then restate your situation with some detail, including sample data (including input and desired output) and what you've tried so far and how it failed.

Regards,
Alister

P.S. If this is indeed a python question, it belongs in the programming forum, not shell scripting.

Thanks alister,

First i am calling fab in shell script to get the value from python, and in python im returning to shell.

This intercall is happening in round robin, so in the second call to shell, i need to skip first fab request and should go to next step

Without seeing the code, I have no idea what you're trying to accomplish and what the implementation looks like. You're unlikely to receive any useful advice if you don't share the shell and python scripts. If it contains sensitive info (passwords, hostnames, ip addresses, etc, replace that with xxxxxx). If it's a lot of code, try to reduce it to a minimal case which accurately reproduces the problem.

Also, I'm assuming fab refers to Fabric. If not, please elaborate. Don't assume that someone who knows the programming language is familiar with all tools.

Regards,
Alister

1 Like