Search Results

Search: Posts Made By: chstr_14
3,455
Posted By chstr_14
Cannot exit from a function?
Hi,
Is there a way to exit from a subcommand, which is a function in my example below?


#!/bin/ksh

function exitFunction {
if [[ $1 -eq 1 ]]; then
echo "success"
elif...
4,792
Posted By chstr_14
Faster than nested while read loops?
Hi experts,
I just want to know if there is a better solution to my nested while read loops below:


while read line; do
while read line2; do
while read line3; do
...
4,460
Posted By chstr_14
The perl works! Thanks to both of you :)
The perl works! Thanks to both of you :)
4,460
Posted By chstr_14
@itkamaraj - yes, that's what I am trying to do....
@itkamaraj - yes, that's what I am trying to do. My code do that but the performance is off.

@yazu - will try that. Would that run in aix?

Thanks to both of you.
4,460
Posted By chstr_14
Faster way to multiply a file Nth times?
Basically, my problem is to multiply my file to $c times. Is there a faster way to do this?


c=100
while [[ $c -ne 0 ]]; do
cat file1.txt
((c=$c-1))
done > file2.txt


I...
Showing results 1 to 5 of 5

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