Search Results

Search: Posts Made By: Camrikron
2,840
Posted By ahamed101
Use -e with the echo in the above code as in echo...
Use -e with the echo in the above code as in echo -e "$output"

Or another approach

#!/bin/bash

read -p "Please enter a name : " name
awk -F":" '
BEGIN{ fmt="%20s%20s\n" }
function...
2,840
Posted By Scrutinizer
The single line output is because of field...
The single line output is because of field splitting (there are no double quotes around the backquotes)..
@OP: try using Ahamed's suggestion like this:
output=$(grep -w "$input" list.txt | awk '
...
2,840
Posted By ahamed101
This is not right. Did you try the code which I...
This is not right. Did you try the code which I gave to see if it works for you without integrating it to your script?
I think what you are trying to do here is, get a input and display the details...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 01:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy