The 'sed' line replaces the first 4 numbers on a line with '/www/repository/<first_4_num>/<first_4_num> and so has no dependency on case. The for loop copies each full path including the file name, which you have not changed, to the destination directory. I do not see how the case of the file is an issue unless the 'serials_3_2010.txt' file contains the wrong file name in the first place. If that is the case and you can not update the process that creates the file list then you can replace the 'cp' copy command and use the 'find' command to copy your files.
I need to check if $1 is A or B
I tried the following but it seems its not correct..would appreciate a suggestion ?
case "$1"
in
"A" || "B" )
;;
esac
Thanks (4 Replies)
HELLO ALL,
URGENTLY NEEDED A SCRIPT TO SELECT AND DELETE LOWER AND MIXED CASE RECORDS FROM A COLUMN IN A TABLE.
FOR EXAMPLE : Table name is EMPLOYEE and the column name is CITY
and the CITY column records will be: Newyork
washington
... (1 Reply)
Hi All
I have a script which extracts values from a Database (A persons name) and puts it into a variable in my script IE: $NAME
However the Value in the DB is all in uppercase and contains the users first name and last name
EG:
> echo $NAME
GRAHAM BOYLE
>
What I need is only the... (7 Replies)
Below is a test script to illustrate a problem from a larger script I am writing.
$ cat /tmp/loggingtest
#!/bin/bash
lvcreate -s -l 100%FREE -n var-data-snapshot vg00/var-data 2> >(logger -t "loggingtest.crit") 1> >(logger -t "loggingtest.info")
sync &
wait
lvremove -f... (1 Reply)
Hi all,
This is my sample code in /etc/httpd/conf.d/applications.conf file currently we are creating subdomain mannually for every new subdomain. I want to automate this process througs bash script , how its possible.
<VirtualHost *:80>
ServerName google.com
ServerAlias google.com... (5 Replies)
I want to run a script that calls remote ssh and if it gets hung, I want to be able to kill that part of the script and run another command in the script
for example I have a statement like this:
if ];
then
export tapes=$(for tape in $(su - nacct -c 'ssh remote1 "cat... (1 Reply)
Hi All,
Am trying to write wrapper shell/bash script on a utility tool for which i need to pass 2 files as arugment to execute utility tool.
Wraper script am trying is to do with above metion 2 files.
utility tool accepts :
a. userinfo file : which contains username
b. item file : which... (2 Replies)
In the below portion of a bash script the user selects a file from a directory.
select file in $(cd /home/cmccabe/Desktop/NGS/API/5-14-2016/bedtools;ls);do break;done
files in directory
123_base_counts.txt
456_base_counts.txt
789_base_counts.txt
second portion of bash currently (user... (4 Replies)
Hey, im fairly new to unix and Im trying to make this unix project that would display a menu and do the following.
MENU
===========================
(p, P) Print users info
(a, A) Add new user
(s, S) Search user
(d, D) Delete user
(x,X) Exit
Enter your choice:
Trying to... (3 Replies)