BASH issue
See original GitHub issueI’m converting a bash script to an F# script to fix a problem with regex in the bash script. But after the regex runs, I need to run more code.
I’m trying to run code like shown below, but it’s not doing anything, and it doesn’t output anything. I have confirmed that pwd
returns the expected current directory. When I run the same command in a bash script, it works as expected.
// 3. Fetch all the new/modified files into the delivery folder.
list_of_files
|> Seq.iter (fun filePath ->
cli {
Shell BASH
Command $"git show HEAD:{filePath} | install -D /dev/stdin {delivery_folder}/{repo_name}/{branch_name}/{filePath}"
}
|> Command.execute
|> ignore
Console.WriteLine $"Downloaded {filePath}"
)
The original bash script looked like this:
IFS="
"
for filename in $list_of_files; do
trimmed_filename=$(echo ${filename} | xargs)
git show HEAD:${trimmed_filename} | install -D /dev/stdin ${delivery_folder}/${repo_name}/${branch_name}/${trimmed_filename}
echo \'${trimmed_filename}\'
done
Issue Analytics
- State:
- Created 2 months ago
- Comments:17 (7 by maintainers)
Top Results From Across the Web
Troubleshooting your bash scripts
If you run into problems building, testing or running complex bash scripts, don't lose heart. There are many ways you can help ensure...
Read more >Bash Shell Script Issues - unix
Bash Shell Script Issues · sourcePath , which is the path to the source files/files being backed up or copied. · backupPath ,...
Read more >2.3. Debugging Bash scripts
Bash provides extensive debugging features. The most common is to start up the subshell with the -x option, which will run the entire...
Read more >Error handling in Bash scripts | Enable Sysadmin
If it returns zero, it means there is no error. If it is non-zero, then you can conclude the earlier task has some...
Read more >scripting - Bash or path problem?
1 Answer 1 ... The issue is most likely that the script does not have the correct value of the environment variable PATH...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I tried that, but it did not create any files. I’ll see if I can get Powershell to work. Thanks for your help.
But thank you for using Fli and don’t hesitate to open further issues when you have any.