TWO QUESTIONS...How to create your own command in UNIX server,How to enter data in a file by script


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers TWO QUESTIONS...How to create your own command in UNIX server,How to enter data in a file by script
# 1  
Old 05-04-2012
TWO QUESTIONS...How to create your own command in UNIX server,How to enter data in a file by script

I am a quite newbie on UNIX SCRIPTING...Please help me solving this two questions...

1st Question;
I want to create one command that will run a script when anyone use that command on that server... I mean, in the prompt if I put my name 'Rony' it will execute a script called 'rony.sh'. How can I do that.. Please suggest...

2nd Question;
I need one script that will ask the user to enter some data and that script will store the data in one file...

Moderator's Comments:
Mod Comment Please repost your question in Homework Forums

Last edited by jim mcnamara; 05-04-2012 at 10:34 PM..
# 2  
Old 05-04-2012
Is it homework? There's a separate forum for that. Check this link before posting.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Command / Script to create touch file in destination server

Hello Team, Is there any Linux command / script available so that, I could create a simple 0 byte file in destination server by issuing the command from source server. If yes, Could you please let me know the possible solutions. in other words I just want to create a touch file in my home... (1 Reply)
Discussion started by: madhuraju
1 Replies

2. Red Hat

How to create a command to enter into a dir?

Hi all, I want to create a command for entering into a specific dir. for eg if i want to go to /var/spool/postfix/pid at any point if i enter a command suppose "sp" in the command line it should take me to /var/spool/postfix/pid thanks (2 Replies)
Discussion started by: technoman
2 Replies

3. Shell Programming and Scripting

Script to prompt user to enter data

Hi All I have a script that moves files from one dir to another dir based on date, but I would like to change it in a way that whoever is going to run to enter the dates in which files will be removed. This is my script: #!/bin/sh touch -mt 201302250000 /tmp/ref3 touch -mt 201302282359... (14 Replies)
Discussion started by: fretagi
14 Replies

4. Shell Programming and Scripting

Need help in writing a script to create a new text file with specific data from existing two files

Hi, I have two text files. Need to create a third text file extracting specific data from first two existing files.. Text File 1: Format contains: SQL*Loader: Release 10.2.0.1.0 - Production on Wed Aug 4 21:06:34 2010 some text ............so on...and somwhere text like: Record 1:... (1 Reply)
Discussion started by: shashi143ibm
1 Replies

5. Shell Programming and Scripting

Extracting data from https server with the help of unix shell script

There is a folder which can be accessed through URL by giving a particular Username and Password.Inside the folder there are few excel sheets.The excel sheets/folder need to be imported from there to unix box with the help of unix shell script. Can anyone help me?Does anyone have code for it?... (2 Replies)
Discussion started by: vanur
2 Replies

6. UNIX for Dummies Questions & Answers

Enter data at end of a file

Hi All, I have a sample datafile: 5.1 5.2 0.8 6.1 What I want to do is create an additional 3 rows with the number "0.7". so that I now have: 5.1 5.2 0.8 6.1 0.7 0.7 (3 Replies)
Discussion started by: tintin72
3 Replies

7. UNIX for Advanced & Expert Users

Create a file and enter data in columns

Hello!!!!!!!! I have an issue regarding inserting records in a file columnwise.Is it possible using awk/nawk script? Example: File1: 1|AAA|25|2 5|qqe|20|7 4|wer|31|81 I need to create a second file in which data can be inserted in a columnwise manner i.e. File2: AAA|25|1|2... (1 Reply)
Discussion started by: abhijeet1409
1 Replies

8. Shell Programming and Scripting

Exit script if the user dosent enter any data within 5 seconds

Hello friends, Kindly help me in developing a script that asks user to enter a value and will wait for 5 seconds for the feedback. If there is no answer from the user the script will perform exit or it will continue doing something else Ex: If yu have a multi OS system i believe while... (3 Replies)
Discussion started by: frozensmilz
3 Replies
Login or Register to Ask a Question