I have a raw data file:
70,1,1,-53.25
70,1,1,,,,-57.50
70,1,1,,,,,,,,,,-48.00
I want to have a output file with the formatting below:
70,1,1,-53.25,,,,-57.50,,,,,-48.00
I mean if these rows have the first similar three variables which will be group into one row. And I try to write a... (1 Reply)
Hi all,
i have a data array as follows.
array=ertfgj2345
array=456ttygkd
.
.
.
array=errdjt3235
so number or elements in the array can varies depending on how big the data input is.
now i have a variable, and it is $1 (there are $2, $3 and so on, i am only interested in $1).
... (9 Replies)
Hi I am trying to get data from an array and input it into awk. Please see below:
###
#!/bin/bash
#declare array
declare -a ARRAY
exec 10</path/to/arrayfile
let count=0
while read LINE <&10; do
ARRAY=$LINE
((count++))
done
#close file
exec 10>&-
ENDLOOP=0 (10 Replies)
hi,
can somebody explain me this?
probably i am overlooking something but i dont know what
why is not printed "7 9 11" instead of this?
$ echo "" | awk '{for(i=1;i<=3;i++){j=7;a=j;j=j+2;} print a,a,a; }'
7 7 7thanks (2 Replies)
Hello experts,
I'm stuck with this script for three days now. Here's what i need.
I need to split a large delimited (,) file into 2 files based on the value present in the last field.
Samp: Something.csv
bca,adc,asdf,123,12C
bca,adc,asdf,123,13C
def,adc,asdf,123,12A
I need this split... (6 Replies)
I'm trying to get the output from awk into a bash array. Here is my script.
#!/bin/bash
while :
do
app=$( osascript -e "tell application \"System Events\" to return name of every process whose frontmost is true" )
echo "$app"
if ava ]]
then
ps -ax | grep -v awk | pids=( $(awk... (5 Replies)
Hello All,
Can you please help me with the below.
#!/bin/bash
ARR="No Differences In Stage Between HASH_TOTALS & HASH_TOTALS_COMP For UNINUM:0722075 PROVIDER:5 EXTRACT_DT:30-SEP-12 VER_NUM:1"
ARR="No Differences In Stage Between HASH_TOTALS & HASH_TOTALS_COMP For UNINUM:0722075 PROVIDER:5... (14 Replies)
Hello. I'm trying to figure out which one of these is not true about an awk array.
-You do not need to formally declare an array; it is created automatically on first assignment
-Array elements can only be addressed using an index
... (1 Reply)