Solved

bash line file output

Posted on 2006-06-09
2
219 Views
Last Modified: 2010-04-22
Hi

I have the following three BASH line commands


mkdir /home/**/**/$username
echo $username >>/home/**/**/$username/$username
echo $password >>/home/**/**/$username/$username


That creates a directory from the variable $username [ read in from user in code above ] and then prints the $username & $password variables into a file called $username.

The data in the file is formated like below:

$username
$password

How can I get it so that it is formated like the next example below:

Username = $username
Password = $password


Thanks for any help.
0
Comment
Question by:3nigmatic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Author Comment

by:3nigmatic
ID: 16872264
Never mind, answered my own question:

mkdir /home/**/**/$username
echo "Username: $username" >>/home/**/**/$username/$username
echo "Password: $password" >>/home/**/**/$username/$username

Silly schoolboy error.
0
 

Accepted Solution

by:
EE_AutoDeleter earned 0 total points
ID: 17026692
3nigmatic,
Because you have presented a solution to your own problem which may be helpful to future searches, this question is now PAQed and your points have been refunded.

EE_AutoDeleter
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
why should double free() crash? 7 35
qos on linux 3 113
shell script or linux command to upload a directory to artifactory? 2 324
awk sed 8 132
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question