Search Results

Search: Posts Made By: Filter500
Forum: Programming 12-16-2011
6,815
Posted By Corona688
Your printf is wrong: printf ("%e\n",...
Your printf is wrong:

printf ("%e\n", &fArray[i]); sscanf needs a pointer to the variable since it overwrites it. printf only expects the value itself. No & is necessary.
27,473
Posted By balajesuri
echo ${x[@]} | sed 's/ /\n/g' > temp.txt
echo ${x[@]} | sed 's/ /\n/g' > temp.txt
27,473
Posted By agama
You can move your redirection to the end of the...
You can move your redirection to the end of the loop, and use a single redirection that will overwrite the file:


for j in "${array[@]}"
do
echo $j
done >tmp.txt
Showing results 1 to 3 of 3

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