Closed squaredevops closed 3 years ago
Mine one seems ok
$ ./search.sh
search % javascript
executing ver 1
executing condition
found file
@squaredevops go for manual
~/.../dev_files/test $ find search.sh -type f
search.sh
~/.../dev_files/test $ file=search.sh
~/.../dev_files/test $ find $file -type f
search.sh
~/.../dev_files/test $ if [[`find $file -type f` == $file ]]; then echo found; else failed; fi
[[search.sh: command not found
No command failed found, did you mean:
Command faked in package fakeroot
Command file in package file
Failed!
Farhan Sadik@KB306-Gaming-PC MINGW64 ~/Desktop/Desktop/echominal-development/dev_files/test (development)
$ a=search.sh
Farhan Sadik@KB306-Gaming-PC MINGW64 ~/Desktop/Desktop/echominal-development/dev_files/test (development)
$ file="$(find $a -type f)"
Farhan Sadik@KB306-Gaming-PC MINGW64 ~/Desktop/Desktop/echominal-development/dev_files/test (development)
$ if [[ $file == $a ]]; then echo found; else echo failed; fi
found
found!
~/.../dev_files/test $ a=search.sh
~/.../dev_files/test $ f=$(fine $a -type f)
No command fine found, did you mean:
Command file in package file
Command find in package findutils
~/.../dev_files/test $ if find $a -type f; then echo ok; else echo f; fi
search.sh
ok
~/.../dev_files/test $ sh search.sh
search % search.sh
search.sh: 15: [[: not found
sorry no search.sh has been found
can you try bash
~/.../dev_files/test $ bash search.bash
search % search.bash
found file
~/.../dev_files/test $ bash search.bash
search % javascript
found file
~/.../dev_files/test $
Successful
Now I'm adding previous find
method in bash
again!
let me know the result!
~/.../dev_files/test $ ls
dialog-scripts get_ver.py 'how to download.txt' play_music.bash search.bash sub_loop.bash sub_loop3.bash youtube-dl
dialog.bash get_ver_test.py javascript scripts.bash search.sh sub_loop2.bash ver_input.bash
~/.../dev_files/test $ bash search.bash
search % youtube-dl
sorry no youtube-dl has been found
~/.../dev_files/test $ bash search.bash
search % scripts.bash
found file
~/.../dev_files/test $
no directory found at this time
We don't need directory at this time
yes it worked
~/.../dev_files/test $ bash play_music.bash
song list from /sdcard/MP3
song1.mp3
song2.mp3
song3.mp3
search % song3.mp3
Now Playing: song3.mp3
Successful!
error