Search Results

Search: Posts Made By: cmccabe
436
Posted By cmccabe
Got it.... if I want to be able to view these...
Got it.... if I want to be able to view these var, for say troubleshooting, canI? They can be virtual I just may need to verify them. Thank you :)

I think you beat me to it and just posted.
436
Posted By cmccabe
So if I am understanding the below should write...
So if I am understanding the below should write each line in config to script.sh to be able to use as variables? By sourceing . $config the config into memory, that will not print the actual...
436
Posted By cmccabe
if I just print the $line I do see each var...
if I just print the $line I do see each var printed. However when I re-direct it to the script I do not see them. Are they avaliable to the script to use?

the config file will be different for...
436
Posted By cmccabe
The first parameter starting the script is...
The first parameter starting the script is config, there are two possible choices depending on the data type so I am going to pass it as an argument. Thank you :).


config=$1

set -- $config...
436
Posted By cmccabe
I get: y being echo on a newline. Thankk you...
I get: y being echo on a newline. Thankk you :).



mkdir TEST && cd $_
echo -e '. $1\necho var' >script.sh
echo 'var=yes' >config
bash script.sh config
yes



y
y
y


should...
436
Posted By cmccabe
Pass config file to bash script
I just want to make sure I am understanding how to pass a config file to a bash script . In the below I pass to arguments to a script, then define them in the script as id and config. I then source...
693
Posted By cmccabe
Thank you all :)
Thank you all :)
693
Posted By cmccabe
Rename file in directory using contents within each file
In the below there are two generic .vcf files (genome.S1.vcf and genome.S2.vcf) in a directory. There wont always be two genaric files but I am trying to use bash to rename each of these generic...
Forum: Shell Programming and Scripting 3 Weeks Ago
762
Posted By cmccabe
I changed the shebang line in the python...
I changed the shebang line in the python executable to #!/usr/bin/env python to match the other .py on my system and get the below error.


python --version on centos 7
Python 2.7.5

...
Forum: Shell Programming and Scripting 4 Weeks Ago
762
Posted By cmccabe
Xargs to call python executable to process multiple bam files
I am running the below loop that to process the 3 bam files (which isn't always the case). A .py executable is then called using | xargs sh to further process. If I just run it with echo the output...
818
Posted By cmccabe
I apologize for the delay in response, the script...
I apologize for the delay in response, the script works perfectly.... thank you very much :).
818
Posted By cmccabe
The id contains the unique prefix of each bam, so...
The id contains the unique prefix of each bam, so the s1,s2,s3,s4.

I am trying to insert each of those into the command in post 3. That is make the command dependent or conditional on id. So if...
818
Posted By cmccabe
I am trying to insert each $id into the standard...
I am trying to insert each $id into the standard command below above the ref following the format -- bam ${id} \. There won't always be
4 $id, that will change each time. Maybe storing each $id in...
818
Posted By cmccabe
How to insert a string and variable at specified position in command in bash?
I currently have a loop that reads all .bam files in a directory (wont always be 4 like in this example,
into $id. What I am trying to do, unsucessfully, is create specific new lines in an exsisting...
828
Posted By cmccabe
Thank you very much :).
Thank you very much :).
828
Posted By cmccabe
awk to average matching lines in file
The awk below executes and is close (producing the first 4 columns in desired). However, when I add the sum of $7, I get nothing returned. Basically, I am trying to combine all the matching $4 in f1...
863
Posted By cmccabe
Thank you all :).
Thank you all :).
863
Posted By cmccabe
awk to extract value after keyword in html
Using awk to extract value after a keyword in an html, and store in ts. The awk does execute but ts is empty. I use the tag as a delimiter and the keyword as a pattern, but there probably is a better...
855
Posted By cmccabe
Thank you both :).
Thank you both :).
855
Posted By cmccabe
If any of the below are in $dir then File found...
If any of the below are in $dir then File found was found, moving on.


fileone.csv
fileOne.csv
Fileone.csv
FileOne.csv


If none of those or alike exist, it will echo "File was found and...
855
Posted By cmccabe
If file pattern exists in directory then continue
he below looks in $dir for any pattern of fileone. As is, it executes but only returns File found if the exact format in the script exsists. Why isn't a pattern of fileone being looked for and if it...
867
Posted By cmccabe
Maybe this will help others: In $dir the...
Maybe this will help others:

In $dir the were multiple csv files that were the same name, so I needed to add a condition to remove all but the last modified that matched the file I was looking...
867
Posted By cmccabe
I found the error in the script... thank you :).
I found the error in the script... thank you :).
867
Posted By cmccabe
Command works interactively but not in bash script
The below command works in the terminal interactively but not as part of a bash script. I though maybe I needed to escape the "$dir" so it isn't interpreted literally, but that's not it. Thank you...
1,827
Posted By cmccabe
Thank you for your help :), works perfect.
Thank you for your help :), works perfect.
Showing results 1 to 25 of 500

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