Command file in unix.


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Command file in unix.
# 1  
Old 01-19-2007
Command file in unix.

Need to know how to create self commands in unix.

I want to do some jobs in my unix machine regularly. i want to make a command kind of stuff. Please let me know how to create a command file in unix.

I crated a file in bin directory and used my logic there it works fine like command when i call.

but i want to make that command file not readable format.

like if i view other commands like ls or other things i cannot read the content . i want to do like that.

Last edited by Krrishv; 01-19-2007 at 03:42 AM..
# 2  
Old 01-19-2007
I think we have to change the mime-type of the command file which i created. Is that right. If so can anybody tell me how to do that?
# 3  
Old 01-19-2007
Quote:
I think we have to change the mime-type of the command file which i created. Is that right. If so can anybody tell me how to do that?
No, I don't think that has anything to do with it actually. Mostly since that doesn't make since to me.




Quote:
I crated a file in bin directory and used my logic there it works fine like command when i call.

but i want to make that command file not readable format.

like if i view other commands like ls or other things i cannot read the content . i want to do like that.
I assume this means you created a type of shell script, but now you want to make a compiled binary file. You would need to learn C or C++ ( or some other language ) and write the program in that language.
# 4  
Old 01-19-2007
okie you mean we have to write in c and then build the file. there is no way in shell is that what you mean?
# 5  
Old 01-21-2007
Yes, that is what I mean.
# 6  
Old 01-23-2007
why?

Why do you want to create a binary file as opposed to the shell script version?

-S
# 7  
Old 01-25-2007
My goal is i dont want anybody to edit that file.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Command to check java file in UNIX

Guys, i need to check whether java file can be executed in my current unix system or not. Can anyone please help me to get the correct command to check this. My Unix system is HP-UX. Thanks, (1 Reply)
Discussion started by: AraR87
1 Replies

2. UNIX Desktop Questions & Answers

Can Unix access Windows' File through Command Prompt in Unix

Hi all, I wish to know whether Unix can access window's file in Unix's terminal? Apart from that, how to copy files or share files between Window and Unix? I get to know of secure copy, however, my company's Unix does not support the feature of secure copy? Any other method for me to share/... (5 Replies)
Discussion started by: jessy83
5 Replies

3. Shell Programming and Scripting

cp command not working in script for non unix file

Piece of code in sh file ------------------------ echo "lalit test bef" which cp cp $l_options $srcdirfile $destdirfile echo "lalit test after" echo "**************************options below" echo "loption $l_options" echo "src $srcdirfile" echo "destinat... (3 Replies)
Discussion started by: lalitpct
3 Replies

4. UNIX for Dummies Questions & Answers

Unix command used for downloading file from net

Hi, Which command I can use to download a file from website? I tried with wget and lwp-dowload but no gain. Can any one suggest me the good way to dowload? (2 Replies)
Discussion started by: siba.s.nayak
2 Replies

5. Shell Programming and Scripting

How to get the first column from the txt file using unix command?

Hi All, I have the file like this (file name is : tem_text) no Id name ccy ------- ---- ------------------- -------- 7777 17 India Overseas Partners 500INR I want to retreive the third colimn of from the above text file if i use the basic awk command cat... (4 Replies)
Discussion started by: psiva_arul
4 Replies

6. UNIX for Dummies Questions & Answers

Unix command to veiw a zip file

Hello, Is there a unix command to view the following zip file? I just need to see the content of it. -rw-r--r-- 1 oracle dba 58403 Jun 28 13:04 test_digital.log.Z Thanks! (3 Replies)
Discussion started by: syang68
3 Replies

7. Shell Programming and Scripting

File handling, getopts command in unix

I need to create a shell script having the menu with few options such as 1. Listing 2. Change permissions 3. Modify Contents 4. Delete Files 5. Exit 1. For 1. Listing: Display a special listing of files showing their date of modification and access time (side by side) along with their... (2 Replies)
Discussion started by: bab123
2 Replies

8. UNIX for Dummies Questions & Answers

list out a file using unix command

Hi, Iam a new member of this group I have got one issue I wanna to find out one file like *.pll in a remote server using unix command i tried giving ls but it wont work acc to my expectation since ls list out the file only in a particular directory eg in C DRIVE I SHUD BE ABLE TO... (2 Replies)
Discussion started by: dmerin
2 Replies

9. Shell Programming and Scripting

basic unix file command!

Hi there, I am looking to create a single file called outputa.txt, which will show the contents of my directorya and its sub directories, and all file and directory permissions. What command would be used for this? Cheers Kev (2 Replies)
Discussion started by: kev112
2 Replies

10. UNIX for Dummies Questions & Answers

UNIX Batch FTP Command file

Hello, I am a UNIX newbie and this is my first posting. I need to create a batch command file to ftp from Sun/Solaris to AS/400. Here is an example file: ftp -d -i -n -v 172.28.16.22 pwd ls binary quit This is the result of executing the command file: Connected to... (10 Replies)
Discussion started by: pietro
10 Replies
Login or Register to Ask a Question