02-09-2014
OK. thanks for posting.. we have a lot of shell experts here to give you ideas (I'm more of a PHP guy these days)..... be patient and someone will reply to you.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello
Am very new to linux/unix, workin in it since 10 days only. I had started with bash and now I need to work in tcsh. I have changed shell for my user profile using 'chsh'
I use gedit for script writing. Now in the first line if I write #!/bin/tcsh i get d msg
/home/usr/.cshrc: No such... (2 Replies)
Discussion started by: mahendrakamath
2 Replies
2. Shell Programming and Scripting
All;
Thanks for reading.
I'm having a heck of a time with this cshell script that fires off an hp temperature monitor and rotates logs.
I keep getting
'/opt/temperature/temp.sh: line 22: syntax error: unexpected end of file'
when I try to 'sh /opt/temperature/temp.sh" it
--script... (3 Replies)
Discussion started by: swjv
3 Replies
3. Shell Programming and Scripting
What are the differences between csh and tcsh shells ? In one of the shell scripts csh binary is a soft link to tcsh. (1 Reply)
Discussion started by: shafi2all
1 Replies
4. Shell Programming and Scripting
Hello, I have two files ..
1. inventory_i.txt
2. inventory_b.txt
I want to check if these two files exists. If exists, then do the process, otherwise, quite...
if ; then
echo "exists"
else
echo " does not exists"
fi
The above logic is not working... It is always, displaying Does... (2 Replies)
Discussion started by: govindts
2 Replies
5. Shell Programming and Scripting
Hello
I have Linux Debian & tcsh shell. My mini script not run :(.
Startup script displays a message:
user@host:dir% ./test
if: Badly formed number.
script:
#!/bin/tcsh -f
#script check size files systems
set x = `df -h /usr | tail -n1 | awk '{ print( $5 ); }'`
set y = 60%
if ($x... (5 Replies)
Discussion started by: moskovets
5 Replies
6. Shell Programming and Scripting
Hi
how to execute a bash script in csh shell?
Thanks (3 Replies)
Discussion started by: rubinovito
3 Replies
7. Shell Programming and Scripting
Hi,
I am totaly new to create a script . Please help.
I have file name retrived from SAP table into a internal table .
Like :-
/home/td_8d02_int_data_IPCL/ILLUSTRATIONS/CGM/l_pc_112138_01_0_01_00.cgm
/home/td_8d02_int_data_IPC-L/ILLUSTRATIONS/CMP/l_pc_112138_01_0_01_00.cmp
Objective... (1 Reply)
Discussion started by: amitkumar.b2
1 Replies
8. Shell Programming and Scripting
Hi,
I would like to check whether all the directories exists or not. I tried the below but it gives some error. below is the excerpt from my original script
24 #Check if the required directories are exists
25 dirExists() {
26
27 if
28 then
29 echo "required... (1 Reply)
Discussion started by: lookinginfo
1 Replies
9. Shell Programming and Scripting
Hi,
I have a csh script. I want to set some variables and execute some command from a file in that script.
abc.csh
echo "primary script"
b
setenv XXX ddd
set XX
make abc
I want to execute the commands of "b" file from abc.csh. How can i do that.
Please view this link: How to use... (3 Replies)
Discussion started by: vdhingra123
3 Replies
10. Shell Programming and Scripting
Hi..
i have a file ABC_*.txt in source directory which will come evry 30 min and same file will be moved to working directory first time ...and will perform some operations then we archive ABC_*.txt ..this will run for 30 min to 45 min
from 2nd time onwards requirement is ...i need to check... (3 Replies)
Discussion started by: dssyadav
3 Replies
LEARN ABOUT DEBIAN
minc_modify_header
MINC_MODIFY_HEADER(1) MINC User's Guide MINC_MODIFY_HEADER(1)
NAME
minc_modify_header - modify the attributes in the header of a minc file
SYNOPSIS
minc_modify_header [<options>] <file>.mnc
DESCRIPTION
Minc_modify_header allows the modification, insertion or deletion of attributes in a minc file. If possible, the file is modified in place,
without copying the data. This will happen when inserting (modifying) an attribute that already exists and that ends up being the same
length or shorter in the new file. If an attribute is deleted or lengthened, then a complete copy of the data is made, resulting in a com-
pletely new file that replaces the original.
If the file is compressed, then it is first decompressed into a file whose name is either the same as that of the original file up to the
".mnc" extension or the same minus the compression extension (".bz", ".bz2", ".gz", ".Z", ".z" or ".zip"). The new file will not be re-
compressed.
Care is taken to completely overwrite any existing attribute when inserting a new attribute so that information is guaranteed to be removed
from the file.
OPTIONS
Note that options can be specified in abbreviated form (as long as they are unique) and can be given anywhere on the command line.
-sinsert var:attr=value
Insert a string attribute into the header. If the attribute does not exist or the new string is longer than the existing one, then
all data in the file will be copied.
-sappend var:attr=value
Similar to -sinsert, but appends the string to the attribute's value. If the attribute already exists it must be of string type.
-dinsert var:attr=value(,...)
Insert a double precision attribute into the header. If the attribute does not exist or the new attribute is longer than the exist-
ing one, then all data in the file will be copied. A comma-separated array of values can be specified.
-dappend var:attr=value(,...)
Similar to -dinsert, but appends the list of double precision values to the attribute's value. If the attribute already exists it
must be of double precision type.
-delete var:attr
Delete an attribute from the header. USE OF THIS OPTION WILL FORCE A COMPLETE COPY OF ALL DATA TO BE MADE. Use -sinsert with an
empty string to delete information without copying data (the attribute will continue to exist).
-help Print summary of command-line options and exit.
-version
Print the program's version number and exit.
EXAMPLES
:
To replace the patient name with an identifier string:
minc_modify_header file.mnc -sinsert 'patient:full_name=C02-F0023'
To delete the patient name completely (forcing a copy of all data):
minc_modify_header file.mnc -delete 'patient:full_name'
To hide the patient name without copying data, assuming that we know that the attribute exists (the attribute will remain in the file, but
it will be empty):
minc_modify_header file.mnc -sinsert 'patient:full_name='
AUTHOR
Peter Neelin
COPYRIGHTS
Copyright (C) 1995 by Peter Neelin
$Date: 2004-05-25 21:33:11 $ MINC_MODIFY_HEADER(1)