10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello, I have a file in the following format
id sample platform R1 R2 gene1 gene2 gene3
1 abc llumina R1_001.fastq.gz R2_001.fastq.gz apoe prnpp asp
2 def llumina R1_001.fastq.gz R2_001.fastq.gz apoe prnpp
3 ghi llumina ... (3 Replies)
Discussion started by: nans
3 Replies
2. Shell Programming and Scripting
I am in the process of creating a BASH shell scripts for a project at work. So the scenario is as such:
I have a file with each line entry separated by ':'
... (3 Replies)
Discussion started by: metallica1973
3 Replies
3. Shell Programming and Scripting
I wrote a simply perl that searched a file for a particualr value and if it found it, rite it and the next three lines to a file. Now I have been asked to check those next three lines for a different value and only write those lines if it finds the second value.
I was thinking the best way to... (1 Reply)
Discussion started by: billprice13
1 Replies
4. Shell Programming and Scripting
I have a file that has four values on each line and I'd like to give each column a variable name and then use those values in each step of a loop. In bash, I believe you could use a while loop to do this or possibly a cat command, but I am super new to programming and I'm having trouble decoding... (2 Replies)
Discussion started by: ccorder22
2 Replies
5. Shell Programming and Scripting
Hi Gurus,
I have a file named log with 2 lines
Each line is a file name. eg
$ cat log
monday
tuesday
I need to read log and assign each output(filename) to a different variable.
The following doesn't work:-
while read A B
do
echo " a is ${A} "
echo " b is ${B} "
done <... (6 Replies)
Discussion started by: wisdom
6 Replies
6. Shell Programming and Scripting
Hi All,
I am trying to read a .csv file which has some 6 columns.
Eg: samp.csv
one, two, three, four
six, seven, eight, nine
I used the following code,
for line in `cat samp.csv`
do
echo "$line"
done
It displays every comma seperated values in each line like,
one,... (1 Reply)
Discussion started by: johnwilliams.sp
1 Replies
7. Shell Programming and Scripting
i get a name from user first name : last name, in this format. Now i am saving this to a file. what i want is, I do not want to save any name if I already have one entry o that same name..what should i do
for example
user give robert fernandez
this will save in file as robert:fernandez.
if... (5 Replies)
Discussion started by: Learnerabc
5 Replies
8. Shell Programming and Scripting
I was trying to store the number of lines in a file and store it in a file.after that i want to store the information in a file to a variable which is further used in the if loop to check certain condition.
#!/bin/bash
cat <file> | wc -l > count.txt
x="$count.txt";
i=10;
if ; then
cat... (10 Replies)
Discussion started by: sudhakaryadav
10 Replies
9. UNIX for Dummies Questions & Answers
HI
I have something like this in a file
ABC = 1
DEF = 2
GHI = 3
JKL = 4
MNO = 5
QRS = 6
TUV = 7
I need to assign ABC to V_abc (that is to a variable)
GHI to V_ghi (that is to another variable)
TUV to say V_tuv
... (6 Replies)
Discussion started by: ssuresh1999
6 Replies
10. Shell Programming and Scripting
I am missing something here, I have a file which contains only one line and that is either a number or character string. I am trying to read the file and assign that value to a variable and here it seems I am missing something and not getting the expected results... Here is the code :
#!/bin/ksh... (2 Replies)
Discussion started by: Vaddadi
2 Replies