10 More Discussions You Might Find Interesting
1. Programming
hi all,
i have created a for loop, it looks like this -
#!/bin/bash
cd /mnt/local/data/tars
for tar in *
do
base=$(basename "$tar")
"$base" -tvf >> /mnt/local/data/logs/"$base".csv
done
but i get this error -
./tar_loop.sh: line 8:... (2 Replies)
Discussion started by: robertkwild
2 Replies
2. Shell Programming and Scripting
Hi,
I have list of files present in a folder. I want to search for a particular keyword sequentially and create a file which will be later used by some other program.
Input files:
$ ls
a.dsx b.dsx c.dsx Dataline_.txt Dataline.txt loop.sh
$ cat *.dsx
help
tyiis
global
for i in... (4 Replies)
Discussion started by: mac4rfree
4 Replies
3. Shell Programming and Scripting
I have 2 files, that look like this:
ID SNP1 SNP2 SNP3 SNP4
A1 1 2 0 2
A2 2 0 1 1
A3 0 2 NA 1
A4 1 1 0 2
and this:
SNP score
SNP1 0.5
SNP2 0.7
SNP3 0.8
SNP4 0.2
Basically, all of the SNP-values are 0,1, 2 or NA, and they each have a score, listed in the second file. The total... (5 Replies)
Discussion started by: kayakj
5 Replies
4. UNIX for Dummies Questions & Answers
I'm doing this script in my Unix class and I've come to a roadblock. The purpose of this script is to search users directories for files that contain bad words i.e kill murder bomb etc., and then be able to ignore legitimate files with each use.
I got the searching and ignoring part down but now... (1 Reply)
Discussion started by: jrod44
1 Replies
5. Shell Programming and Scripting
i have a file 'detail' which contains
cat detail
111111
222222
333333
444444
but detail may be 4 line file.6 line file or 8 line file like
cat detail
111111
222222
333333
444444
555555
666666
777777
888888
so i want a declare a loop which assign the value of first line in one... (11 Replies)
Discussion started by: rakeshtomar82
11 Replies
6. Shell Programming and Scripting
I have the following code and want to use a loop to output the results to the fparams file.
if ($optparams == 1) then
# Set the tdarwin parameters
set txt01 = "Call to raytrac.csh"
set txt02 = ""
set txt03 = "./Scripts/raytrac.csh $*"
set txt04 = ""
set txt05 =... (0 Replies)
Discussion started by: kristinu
0 Replies
7. Shell Programming and Scripting
I have 2 questions.
1) Is there a means of directing output to a file (">") while making it still output to the console?
I have a script that calls another lengthy script.
2) I can direct the output of the lengthy script and grep it for the words "good" or "bad" to know if I need the run... (2 Replies)
Discussion started by: mrwatkin
2 Replies
8. Shell Programming and Scripting
hi all,
i'm trying to create a shell script that browse files in a directory and generates another shell script based on these files.
for ex:
/tmp/files/ is the directory i want to browse and it has 2 files file1.sh and file2.sh.
now my shell script should browse /tmp/files/ and... (6 Replies)
Discussion started by: adshocker
6 Replies
9. Shell Programming and Scripting
Hi Guyz
I designed a script that can compare 2 columns(values) of single file and gives the closest numbers to the first column by comparing the numbers in first column with second and it works in a single file.
Now I'm trying to design a new script with 2 objectives for 2 files (not a single... (4 Replies)
Discussion started by: repinementer
4 Replies
10. Shell Programming and Scripting
How does the expenditure of the following commands see out (in a sh-compatible Shell as bash or ksh)?
a) A=2; echo $A; ( echo $A; A=5; echo $A ); echo $A
b) B=2; echo $B; sh -c 'echo $B; B=5; echo $B'; echo $B
c) C=2; export C; echo $C; sh -c 'echo $C; C=5; echo $C'; echo $C
Explain in each... (2 Replies)
Discussion started by: tintin
2 Replies