10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
have a script that calls child scripts depending on conditions. All of the child scripts source in a common file that contains shared functions.
At the moment each script has to source this file itself, is there a way for the master script to automagically source the file for them?
For... (3 Replies)
Discussion started by: redman
3 Replies
3. Shell Programming and Scripting
Just started learning bash ,and I am confused with sintaksis
line 16: syntax error near unexpected token `else'
thanks
#!/bin/bash
echo -n "Enter: "
read num
if(($(echo ${#num}) == 0 ))
then
echo No arguments passed.Try again
elif
rem=$(echo $num | tr -d )
... (7 Replies)
Discussion started by: lio123
7 Replies
4. 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
5. 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
6. Shell Programming and Scripting
Hi,
I want to create a script that gets a filename as an argument.
The script should generate a listing in long list format of the current directory, sorted by file size.
This list must be written to a new file by the filename given on the command line.
Can someone help me with this?
... (6 Replies)
Discussion started by: I-1
6 Replies
7. UNIX for Advanced & Expert Users
1. Is . wildcard? , the documented wildcard are "*", "?", and ""
. seems mean everything, the follwing cmd will copy everything
cp -r /tmp/test1/. /tmp/test2/
However it doesn't work for rm, why?
$ ls -a
. .. .a .aa aa t2
$ rm -rf .
$ ls -a
. .. .a .aa ... (3 Replies)
Discussion started by: honglus
3 Replies
8. Shell Programming and Scripting
How can I pass in an argument such as "*.k" to a bash script
without having to double-quote *.k and not having *.k
`glob` to match all files in the pattern?
I tried using noglob in my script but this didn't work the way I thought
it would.. expansion is still occuring, $# is higher than I... (3 Replies)
Discussion started by: zoo591
3 Replies
9. Shell Programming and Scripting
Hi Guys,
I found this script for monitoring the status of a services:
for i in syslogd cron; do
if && ;
then
printf "%-8s" "$i";printf " is alive=A\n"
else
printf "%-8s" "$i";printf " is not alive\n"
fi
The script is working fine except if either syslogd or cron will have a defunct... (3 Replies)
Discussion started by: itik
3 Replies
10. UNIX for Dummies Questions & Answers
I'm trying to figure out how to build a small shell script that will find old .shtml files in every /tgp/ directory on the server and delete them if they are older than 10 days...
The structure of the paths are like this:
/home/domains/www.domain2.com/tgp/
/home/domains/www.domain3.com/tgp/... (1 Reply)
Discussion started by: Neko
1 Replies