Skip to main content
24 events
when toggle format what by license comment
May 19, 2022 at 15:51 history edited terdon CC BY-SA 4.0
added 10 characters in body
May 19, 2022 at 15:50 answer added terdon timeline score: 0
May 19, 2022 at 15:50 history undeleted terdon
May 19, 2022 at 15:50 comment added terdon I am undeleting this since you have edited enough to make it answerable. It seems a shame to delete it.
May 19, 2022 at 15:49 history deleted Echo94 via Vote
May 19, 2022 at 15:45 comment added Echo94 @terdon okay that makes sense..
May 19, 2022 at 15:38 comment added terdon Is this really your script? That will just delete all of your fastq files without actually running anything. Are you sure? I think what you want to do is write the final script, the part after the #!/bin/bash into a file and then execute that file, but you are not doing that and by the time you are writing eval ${cmd}, the $cmd variable only has rm -r $fastq_dir, so that's the only thing that will be executed.
May 19, 2022 at 15:30 comment added Echo94 @terdon, hi thanks for the input, I have pasted my script as it is, hope it helps. My only concern with script is I want to make some space whilst its done using it while it iterates in the loop. thanks The script works just fine.
May 19, 2022 at 15:27 history edited Echo94 CC BY-SA 4.0
added 403 characters in body
May 19, 2022 at 14:14 comment added terdon Almost. You have now shown part of the code (I am guessing you forgot to include the cat <<EoF > somefile, right?) that creates a script that will I guess be run to execute the command, is that right? Your code is still never actually executing ${cmd} anywhere, you only have eval ${cmd} inside the EoF docstring. So does this mean you are generating another script and then running that? When, exactly, are you launching $cmd?
May 19, 2022 at 14:11 comment added Echo94 @terdon sure thanks. please see if the additional edit help it any better for you?
May 19, 2022 at 14:08 history edited Echo94 CC BY-SA 4.0
added 72 characters in body
May 19, 2022 at 14:07 comment added terdon And I am trying to explain that yes, of course you can delete a folder if you don't need it anymore, but if you need us to help you and show you how to delete, we will need to see the actual script. Otherwise, all we can tell you is "sure, of course you can delete data you no longer need". But we don't know if "this is the right way to do this" since the way you show wouldn't work in the first place.
May 19, 2022 at 14:05 comment added Echo94 @terdon, there is a 'done' at the end of the file. I will add that. I just want to know if there's a way to delete files once I have used them to run a tool. If you don't have an input there please don't comment on my post. I do appreciate that you've tried, so thanks.
May 19, 2022 at 14:03 comment added Echo94 Are all people rude over here? @ArtemS.Tashkinov No, my question isn't about whether my script is right or not. I am simply asking if there is a way to delete folders once executing the cmd sbatch.
May 19, 2022 at 12:33 comment added terdon No, that script won't work. You haven't closed the for loop and the #!/bin/bash is ignored as a comment. Please show us your actual script, including the part where you execute $sbatch so we can understand what you are doing.
May 19, 2022 at 12:30 comment added Artem S. Tashkinov Please edit your question instead of giving more info in the comments.
May 19, 2022 at 12:01 history edited Artem S. Tashkinov CC BY-SA 4.0
added 17 characters in body; edited title
May 19, 2022 at 11:51 comment added Echo94 The script above rm works! I am just wondering if I can delete a folder after executing through cmd. and is it the right way to do this?
May 19, 2022 at 11:50 history edited Echo94 CC BY-SA 4.0
added 27 characters in body
May 19, 2022 at 11:11 comment added terdon Where are you running the command? There's no command being executed in your script. Also, the shebang (#!/bin/bash) needs to be the first line of your file, you can't have it in the middle like that. Yes, you can absolutely delete the directory after running the command, but we need to see the actual script you use to be able to help you with it, one that shows us when you execute the command.
May 19, 2022 at 11:09 history edited terdon CC BY-SA 4.0
added 20 characters in body; edited tags
S May 19, 2022 at 10:46 review First questions
May 19, 2022 at 11:22
S May 19, 2022 at 10:46 history asked Echo94 CC BY-SA 4.0