Search Results

Search: Posts Made By: canishk
3,217
Posted By canishk
So there is no use of functions, if there is no...
So there is no use of functions, if there is no means of re-usability then what is the need of functions ?:rolleyes:
3,217
Posted By canishk
Oh, I am sorry. I am using bash shell GNU...
Oh, I am sorry.

I am using bash shell
GNU bash, version 3.2.48(1)-release (i486-pc-linux-gnu)
Copyright (C) 2007 Free Software Foundation, Inc.

if I drop that echo in my function is it going...
3,217
Posted By canishk
Function call with argument doubt
Hi all,

I am having a problem with user defined function call. I am new into the concept of shell script UDFs.

My function is:

iterate_directory()
{
cd $1
k=0
for i in *
do
...
12,753
Posted By canishk
No worries, anyway thank you for your great help....
No worries, anyway thank you for your great help.

I will update if I found something.

Regards,

Anish

---------- Post updated at 04:40 PM ---------- Previous update was at 12:58 PM...
12,753
Posted By canishk
both are /bin/bash /bin/bash /bin/bash
both are /bin/bash
/bin/bash
/bin/bash
12,753
Posted By canishk
When I tried with terminal It works, but when I...
When I tried with terminal It works, but when I run the script, it shows the error.:confused:

new.sh: 3: a[0]=2: not found
new.sh: 4: Bad substitution
12,753
Posted By canishk
Yeah for me too the output for your query is...
Yeah for me too

the output for your query is

GNU bash, version 3.2.48(1)-release (i486-pc-linux-gnu)
Copyright (C) 2007 Free Software Foundation, Inc.
12,753
Posted By canishk
when I tried to run your code I got this output. ...
when I tried to run your code I got this output.

check.sh: 9: arr[i++]=Resume_A_09_v2.pdf: not found
check.sh: 9: arr[i++]=SciTE.4115.in: not found
check.sh: 9: arr[i++]=kde-a: not found...
12,753
Posted By canishk
Yes #!/bin/bash
Yes #!/bin/bash
12,753
Posted By canishk
I am using linux bash shell (using ubuntu 9.04...
I am using linux bash shell (using ubuntu 9.04 kernal), I don't have any windows partition.
12,753
Posted By canishk
Hey, The matter is when I comment the...
Hey,

The matter is when I comment the ARRs[$k]="$i" line, then it works fine. Here is the output you asked for




+ [ -d <HomeFolder>/Documents/test ]
+ cd...
12,753
Posted By canishk
bash Script: Issue with iterating Directory and store into array
Hi all,

I am working on a backup based script, in which it enters to a directory and check the sub-directories and copy the names into an array.


cd $CPFs
k=0
for i in *
do
...
Showing results 1 to 12 of 12

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