Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7957873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:19:48+00:00 2026-06-04T04:19:48+00:00

I have written a Python program say: inp = raw_input(ENTER path ) f =

  • 0

I have written a Python program say:

inp = raw_input("ENTER path ")
f = glob.iglob(os.path.join(path,'*.txt'))
for filename in f:
    if filename == 'xnak.txt': 
       print "this is a valid file"  
    else:  
       print 'not recognized'`  

Now I want to make it a Unix C shell(csh) command with script-name name.

Please help me out. I don’t have a high level understanding in Unix, basic and simple ideas are welcome.

Simply I just want to make this prog named x.py like the cd command in a csh. You know, wherever you type cd [dirname] the cd function works fine. I need to just make the prog like that.
So that, I won’t need to copying around the program/script from folder to folder for analyzing data of a folder.

like when in a folder I type x 11 (and hit enter) then the program starts executing and stops after executing 11 loops of searching.
If anyone still don’t understand the question properly then please ask for justification rather than downvoting or wrong answering.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:19:49+00:00Added an answer on June 4, 2026 at 4:19 am

    If you want your python script to be executable from the shell in unix, you’ll want to do two things:

    1. Add a shebang line that says it should be run using python. This should be the first line of your script, and will probably be something like:

      #!/usr/bin/python
      
    2. Mark the file as executable, using chmod. You can do this from the command-line by typing:

      chmod +x test
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So right now I have written a python program which takes the path name
I have written a Python program to find the carrier of a cell phone
Well, i have written a simple python program that parses HTML with HTMLParser. Here
I have written my program in python. It is written across seven files and
I have written a simple python program l=[1,2,3,0,0,1] for i in range(0,len(l)): if l[i]==0:
I have written a program in Tkinter (Python 2.7), a scrabblehelper in Norwegian which
I am an intermediate level Python Programmer and I have written a Python program
Basically I have written two modules for my Python Program. I need one module
I have written a small C program that embeds Python. I'm setting it up
I have a program written in python that uploads an archive (zip file) to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.