Create a bash array from a flat file of whitespaces only.

Tags
solved

Login to Reply

 
Thread Tools Search this Thread
# 8  
Old 02-05-2018
Try also
Code:
IFS=,
ARRAY=( $(sed 's/./&,/g;' /tmp/ARRAY) )

You may want to save the old IFS value beforehand.
Login to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Similar Threads More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Bash to search file based off user input then create new file cmccabe Shell Programming and Scripting 5 05-01-2015 11:47 AM
Create a flat file and directory structure heros Shell Programming and Scripting 11 02-26-2013 05:41 AM
Passing values from file into array in Bash ShiGua UNIX for Dummies Questions & Answers 3 11-19-2012 11:12 AM
Read a flat file, evaluate and create output. UNIX SCRIPT. mrreds UNIX for Dummies Questions & Answers 4 04-19-2012 07:02 PM
perl: Read array from a flat file Pratik4891 Shell Programming and Scripting 8 11-23-2011 11:30 AM
how to create flat file delimited by "\002" injey Shell Programming and Scripting 4 12-29-2010 08:00 AM
Configure disk array in RAID5 and create file system Kjons76 Solaris 6 12-14-2010 02:01 PM
Bash Scripting - How to grep a file into an array TwelveDays Shell Programming and Scripting 6 09-17-2010 03:10 PM
Possible performance improvement (Bash and flat file) prafulnama Infrastructure Monitoring 9 05-11-2010 07:05 PM
[bash] redirect (save) array to a file ASGR Shell Programming and Scripting 7 10-29-2009 03:59 AM
How do I create an array from a file using every 3rd line BRH Shell Programming and Scripting 15 08-07-2009 11:15 AM
csv file to array, match field1, replace in flat file field1 to field2 frankie_konin Shell Programming and Scripting 23 02-03-2009 03:46 PM
trimming whitespaces in a file gintreach UNIX for Dummies Questions & Answers 2 11-25-2008 01:33 PM
create array holding characters from sring then echo array. rorey_breaker Shell Programming and Scripting 5 09-28-2007 09:42 AM
How To create Flat Files using Unix Shell Script? Aparna_k82 Shell Programming and Scripting 4 02-10-2005 05:49 AM
All times are GMT -4. The time now is 12:52 PM.

Unix & Linux Forums Content Copyright 1993-2018. All Rights Reserved.