Need quick help


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need quick help
# 1  
Old 09-25-2007
Hammer & Screwdriver Need quick help

I have one script that named testing.sh
#cat testing.sh
#/bin/bash
echo "Enter your name:"
read name

#./testing.sh
Enter your name:
Sanjay

What I need it should take Input in the same prompt(mean to say dun go for next line) like given below.
#./testing.sh
Enter your name:Sanjay

~~~Sanjay~~~
# 2  
Old 09-25-2007
This sounds like homework.
One way, depending on your version of echo
Code:
echo "enter your name \c"
read name

Code:
#linux
echo -n "Enter your name"
read name

Don't ask for homework help oon the forums - against the rules
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Quick question

Hi guys Quick question Im creating an FTP server and im chrooting each user to there home directory blah blah. Ive also setup scponly so there locked etc. Im a novice at unix and have just reaslised the primary group of scponly is the username of one of the ftp users... which im sure... (1 Reply)
Discussion started by: mokachoka
1 Replies

2. Shell Programming and Scripting

Quick question

When I have a file like this: 0084AF aj-123-a NAME Ajay NAME Kumar Engineer 015ED6 ck-345-c 020B25 ef-456-e 027458 pq-890-p NAME Peter NAME Salob Doctor 0318F0 xy-123-x NAME Xavier Arul NAME Yesu Supervisor 0344CA de-456-d where - The first NAME is followed by... (6 Replies)
Discussion started by: ajay41aj
6 Replies

3. Solaris

Quick help!

Hi, iam trying to use lofiadm in solaris 5.10 but getting the following error.. bash-3.00# lofiadm -a /asmdisks/_file_disk1 lofiadm: /dev/lofictl: No such file or directory i dont see lofictl file in /dev .. i checked in other similar machines..i found this file..can i export this file from... (2 Replies)
Discussion started by: rags_s11
2 Replies

4. Shell Programming and Scripting

Quick one

Hallo friends, I have a log file called xxx.log which is generated everymorning. I want to change this file to xxx_.log Please assist, i am using ksh on AIX. Ta, Pax (4 Replies)
Discussion started by: kekanap
4 Replies

5. AIX

quick question

Hi, At best I'm a junior admin with a big problem. My developers have got my root password and mgmt insists they need it. I can't even change it when people knowing it leave. I'm certain they've hardcoded it into routines. I've searched my servers and grepped everything & can't find it. ... (5 Replies)
Discussion started by: keith.m
5 Replies

6. UNIX for Dummies Questions & Answers

Quick question

Hello all, Quick question from a fairly new to Unix developer. if then completedLogFile=$logfile.$(date +%Y%m%d-%H:%M:%S) mv $logfile $completedLogFile fi I understand that this portion of code is simply copying a tmp logfile to a completed logfile when a condition is true. The... (2 Replies)
Discussion started by: JohnnyBoy
2 Replies

7. UNIX for Dummies Questions & Answers

quick question

from command prompt I did grep two words on a same line for eg: grep abc | grep xyz and I got tht particular line, but I want to know when I vi that file how to directly search for that particular line? I appreciate if any one can provide answer, thanks in advance (2 Replies)
Discussion started by: pkolishetty
2 Replies

8. UNIX for Dummies Questions & Answers

i need quick help???...please

hey guys i'm new in this world " unix " i wanna any websites can help me to learn unix or any websites i can download UNIX from it thanks :D (3 Replies)
Discussion started by: M_Hafez
3 Replies
Login or Register to Ask a Question