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
Solved

bash line file output

Posted on 2006-06-09
2
217 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
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
KVM vs  Qemu 4 118
Help with a backup script in Linux 4 76
Linux: disable vim auto-comment 7 136
Linux : taking backup different mount points under the same directory 8 87
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

828 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