Search Results

Search: Posts Made By: mirko86
3,033
Posted By mirko86
Not for me. I suppose that RavinderSingh13...
Not for me.

I suppose that RavinderSingh13 is right: the cause may be the ACK,
but how can I remove IT.
I've tried but I cannot do it
3,033
Posted By mirko86
Admin@L-IT-03404 ~ $ cat -vet bashScriptTest.sh...
Admin@L-IT-03404 ~
$ cat -vet bashScriptTest.sh
#!/usr/bin/env bash^M$
cd $1^M$
dates=`ls`^M$
echo $dates
3,033
Posted By mirko86
Result calling it with /home/Admin/data: ...
Result calling it with /home/Admin/data:
Admin@L-IT-03404 ~
$ ./bashScriptTest.sh /home/Admin/data
: No such file or directory: cd: /home/Admin/data
bashScriptTest.sh data test.txt


Result of...
3,033
Posted By mirko86
in Admin there is a data directory, The Admin...
in Admin there is a data directory, The Admin content is in my previuos post.

The problem is that if I write the same command of the script directly in the shell, this commands works.
So if in...
3,033
Posted By mirko86
/home/Admin/data and this is the content of...
/home/Admin/data

and this is the content of Admin :
bashScriptTest.sh data test.txt
3,033
Posted By mirko86
it's the same result: Admin@L-IT-03404 ~ $...
it's the same result:

Admin@L-IT-03404 ~
$ pwd
/home/Admin

Admin@L-IT-03404 ~
$ ./bashScriptTest.sh /home/Admin/data
: No such file or directory: cd: /home/Admin/data
bashScriptTest.sh...
3,033
Posted By mirko86
I'm not sure what was your question. That is what...
I'm not sure what was your question. That is what I've done:

#!/usr/bin/env bash
echo $(pwd)
cd $1
dates=`ls`
echo $dates

And the result is:

$ ./bashScriptTest.sh data
/home/Admin
: No...
3,033
Posted By mirko86
yes, I pass the relative folder to cd. I call...
yes, I pass the relative folder to cd.
I call the script in this way:
./bashScriptTest.sh data
So I whant the script cd to the inner directory "data".

The script fail and give me this error:...
3,033
Posted By mirko86
Bash script
I want a script that change to a directory (the first param) and display all the files inside it

Why this really simple script don't change directory ?

#!/usr/bin/env bash
cd $1
dates=`ls`...
Showing results 1 to 9 of 9

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