10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I need to split a file into two of different locations by re-direction in awk.
cat infle
aaa 1 3
bbb 2 4
aaa 3 3
bbb 4 4
aaa 5 3
bbb 6 4
cat /storage/tmp/group_a.gtf
aaa 1 3
aaa 3 3
aaa 5 3
cat /storage/tmp/group_b.gtf
bbb 2 4
bbb ... (2 Replies)
Discussion started by: yifangt
2 Replies
2. Shell Programming and Scripting
Hello,
I am running a bash script to do an rsync back on a computer running MacOS High Sierra. This is the script I am using,
#!/bin/bash
# main backup location, trailing slash included
backup_loc="/Volumes/Archive_Volume/00_macos_backup/"
# generic backup function
function backup {... (12 Replies)
Discussion started by: LMHmedchem
12 Replies
3. Shell Programming and Scripting
Hello.
I cannot write a command without using eval.
Any help is welcome
Note 1 : What does the function SOMETHING has no importance.
Note 2 : What does the command find has no importance.
It is an expansion variable problem : where to put or or or anythings else
What works (FILTRE_1... (8 Replies)
Discussion started by: jcdole
8 Replies
4. Shell Programming and Scripting
$ ls -1
a.1
b.1
x_a.1
x_b.1
$ ls -1 *
b.1
x_a.1
x_b.1
$ ls -1 **
a.1
b.1
x_a.1
x_b.1The last result is not as expected.
Why?
Thanks. (2 Replies)
Discussion started by: carloszhang
2 Replies
5. Shell Programming and Scripting
Hi there,
I am pretty new to linux scripting so ..
I am writing a script to loop through all my directories of sequence files in order to do stuff with them (trimming, normalizing, stuff that one would do with sequence files).
Here I need to pick out files that match each other. The files... (10 Replies)
Discussion started by: jahndavik
10 Replies
6. Shell Programming and Scripting
I am having difficulty with the following script:
#! /bin/bash
filelist=~/data/${1}*
~/./convertFile $filelist ~/temp/outputEssentially, there are a large number of files in the directory ~/data, each with a four-letter code at the beginning (eg. aaaa001 aaaa002 bbbb001 bbbb002 etc). The... (11 Replies)
Discussion started by: Lears_Fool
11 Replies
7. Shell Programming and Scripting
I tried to use the wildcard '*' in my bash script, but I can not get it work. Here is a simple example (list file names in current directory):
ls ./*
does not work in my bash script. But it works if I use
ls ./
So is there any special syntax to use '*' wildcard in bash script (I tested the... (11 Replies)
Discussion started by: aerosols
11 Replies
8. Shell Programming and Scripting
Is it possible to have a bash script pick the highest and lowest values of four variables? I've been googling for this but haven't come up with anything. I have a script that assigns variables ($c0, $c1, $c2, and $c3) based on the coretemps from grep/sed statements of sensors. I'd like to also... (5 Replies)
Discussion started by: graysky
5 Replies
9. UNIX for Dummies Questions & Answers
Hi, I'm trying to use "read" to read in SQL lines and then apply to UDB. However KSH is expanding the *'s in the SQL into a list of all the files in the current directory...
Anyway to turn this off?
while read SQLStatement
do
echo "Running : " $SQLStatement... (8 Replies)
Discussion started by: gaijin 06
8 Replies
10. Shell Programming and Scripting
I would like to process a list of files matching: GPS*\.xyz with an awk script. I would then like to output the files to GPS*\.xyz.out (e.g. the same file name appended with .out). Something like:
awk '{if(NR==1) {offset=-$1}; $1=$1+offset; print }' GPS*.xyz
this does exactly what I want EXCEPT... (3 Replies)
Discussion started by: franzke
3 Replies