Search Results

Search: Posts Made By: gavin_L
1,266
Posted By gavin_L
Help with reading column in array
I have some version problem to use this code in my server


while read line; do
read -A array <<<$line <---------- the server dont read <<<
n=${#array[@]}
for ((i=1;i<$n;i++));...
5,727
Posted By gavin_L
how to add text into the last line of text file
I need help with insert text to the last line of text file with echo command

I know can do something like echo "i4\n$logtext\n.\nwq" | ex -s $file can insert to first line, but how can i change...
2,149
Posted By gavin_L
reading data from a file to an array
I need some help with this code below, i doesnt know why it will run twice with my function, but my function only got if else, any other way that can read line and put into array?


while read...
2,446
Posted By gavin_L
Thanks everyone for helping, i try out those code...
Thanks everyone for helping, i try out those code it works great so far :D:b:
2,446
Posted By gavin_L
ok i have a file with content looks like this: ...
ok i have a file with content looks like this:


add data1 data2
delete data1 data2
replace data1 data2 data3


i need to read this...
2,446
Posted By gavin_L
I am able to print the results out but i need to...
I am able to print the results out but i need to like use the values (the output value) and set each data with a variable sth like

a = ${array[1]}

but i know this wont work.
i am not sure...
2,446
Posted By gavin_L
How to get value from array and set those values as a variable
I am new to ksh scripting, specially array. How do i get values from an array and set the value as variable and pass those variables to the different functions??

someone taught me how to get...
3,576
Posted By gavin_L
How to read file and load data into a script as variable
I need to read a text file that contain columns of data, i need to read 1st column as a function to call, and others are the data i need to get into a ksh script.

I am quite new to ksh scripting,...
3,025
Posted By gavin_L
Thanks this works, do u mind explaining to me...
Thanks this works, do u mind explaining to me what it means?

By the way i have a dumb question to ask, after doing this, how can i save it in the original file?

Sorry for asking dumb...
3,025
Posted By gavin_L
Need help with sorting in paragraphs
I am very new to shell scripting, current try to do a sorting of a text file in paragraphs with ksh script.

example:

File content:

A1100001 line 1 = "testing"
line 2 = something,
line 3...
Showing results 1 to 10 of 10

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