Sponsored Content
Special Forums UNIX Desktop Questions & Answers Appending file extensions to filenames in bash scripts Post 302422281 by malcomex999 on Tuesday 18th of May 2010 03:07:12 AM
Old 05-18-2010
I guess you echo at the end the variable "filename" so it prints the without extension which is correct.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash Scripts - File generating

Forgive the daft requests - I'm still a learner :D I need a script so that I can test another script (I'm confused already) The script I am looking for should generate a new file in the same directory (called newfile1 or what ever) and also generate text within the new file (Hello world? What... (1 Reply)
Discussion started by: JayC89
1 Replies

2. UNIX for Dummies Questions & Answers

Appending text to a number of similar filenames

Hi, I was wondering if there was a way to append something to filenames based on a wildcard. For example, if I have the following files in a directory: blah1 blah2 blah3 blah4 blah5 I want to rename these all to: blah1.txt blah2.txt blah3.txt blah4.txt blah5.txt Is there a... (4 Replies)
Discussion started by: Djaunl
4 Replies

3. Shell Programming and Scripting

bash: reading filenames from file

Hi, I'm trying to write a script that reads filenames from a file and use these filenames in a loop. The filenames are all on one line and the problem is that these filenames have wildcards like * and braces like in them. Right now what I'm doing is something like this: echo "reading from... (0 Replies)
Discussion started by: warp17
0 Replies

4. Shell Programming and Scripting

link scripts to file extensions for tab completion

Is there a way to link a script in my ~/bin with file extension priority for tab completion? for example, if the script I have could only look at .tex files, and I have 6 files in the same directory with the same name, but different extensions: index.tex index.dvi index.toc ... etc... it... (0 Replies)
Discussion started by: pyramation
0 Replies

5. Shell Programming and Scripting

Changing the Bash Scripts to Bourne Scripts:URGENT

Hi, I have to write a program to compute the checksums of files ./script.sh I wrote the program using bash and it took me forever since I am a beginner but it works very well. I'm getting so close to the deadline and I realised today that actually I have to use normal Bourne shell... (3 Replies)
Discussion started by: pgarg1989
3 Replies

6. Shell Programming and Scripting

Bash - Appending to specific line in file

I'm working on a personal project, a multiplication quiz script for my kids. In it, the user's performance will be recorded and written to a file. After they've played it a little while, it will start to focus more on the ones that give them the most trouble-- that take a long time to answer or... (4 Replies)
Discussion started by: treesloth
4 Replies

7. Shell Programming and Scripting

Appending date to UNIX Filenames

Hello, I have a file name in the below format and have to append the date as _$currdate. kchik_UK_lo.txt_$currdate. The above should be the format and I dont want to put entire filename as above in the code, but it should give me the output as the above filename.Can anyone please help... (7 Replies)
Discussion started by: harika03
7 Replies

8. Shell Programming and Scripting

Writing hive scripts in bash script file

Hi, I wanted to load data from HDFS to HIVE by writing bash script. Description: I have written a bash script to validate the data and loaded validated data from local file system to HDFS. Now in the same bash script i wanted to load the data from HDFS to HIVE. How can i do it ? Also how tyhe... (2 Replies)
Discussion started by: shree11
2 Replies

9. Shell Programming and Scripting

Writing Hbase and pig scripts in the bash script file

Hi, I have a script file where i'm validatig the input file and storing the validated records on HDFS. I wanted to load data from HDFS to HBASE using pig script. So for that i have created a HBASE table and written pig script to load data from HDFS to HBASE which is working fine. Now i wanted... (0 Replies)
Discussion started by: shree11
0 Replies

10. UNIX for Beginners Questions & Answers

Can I view Bash POSIX extensions?

Hello.. and thanks in advance for any help anyone can offer me to figure this out I'm reading about the about the Bash shell... and I've read from many sources that to make Bash POSIX compliant it needs "extensions"... Which sounds to me like something I should be able to load or unload into... (1 Reply)
Discussion started by: bodisha
1 Replies
SIEVEC(1)						      General Commands Manual							 SIEVEC(1)

NAME
sievec - Sieve script compiler for the Dovecot secure IMAP server SYNOPSIS
sievec [-d] [-x "extension extension ..."] script-file [out-file] DESCRIPTION
The sievec command is part of the Sieve implementation for the Dovecot secure IMAP server. Sieve (RFC 5228) is a simple and highly extensi- ble language for filtering e-mail messages. It can be implemented for any type of mail access protocol, mail architecture and operating system. The language cannot execute external programs and in its basic form it does not provide the means to cause infinite loops, making it suitable for running securely on mail servers where mail users have no permission run arbitrary programs. Using the sievec command, Sieve scripts can be compiled into a binary representation. The resulting binary can be used directly to process e-mail messages during the delivery process. The delivery of mail messages and therefore also the execution of Sieve scripts is performed by Dovecot's local delivery agent (LDA) called deliver. Usually, it is not necessary to compile the Sieve script manually using sievec, because deliver will do this automatically if the binary is missing. However, in some cases deliver does not have permission to write the compiled binary to disk, forcing it to recompile the script every time it is executed. Using the sievec tool, this can be performed manu- ally by an authorized user to increase performance. The sievec command accepts two arguments: the script-file argument specifies the script to be compiled and the out-file argument specifies where the (binary) output is to be written. This Sieve implementation reconizes files with a .sieve extension as Sieve scripts and corre- sponding files with a .svbin extension as the associated compiled binary. This means for example that Dovecot's deliver process will look for a binary file 'dovecot.svbin' when it needs to execute 'dovecot.sieve'. Such filename is chosen automatically for the binary output when the out-file argument is missing. If the script-file argument is a directory, all files in that directory with a .sieve extension are compiled into a corresponding .svbin binary file. The compilation is not halted upon errors; it attempts to compile as many scripts in the directory as possible. Note that the -d option and the out-file argument are not allowed when the script-file argument is a directory. The sievec command is also useful to verify Sieve scripts before using. Additionally, with the -d option it can output a textual (and thus human-readable) dump of the generated Sieve code to the specified file. The output is then identical to what the sieved(1) command produces for a stored binary file. This output is mainly useful to find bugs in the compiler that yield corrupt binaries. OPTIONS
-d Don't write the binary to out-file, but write a textual dump of the binary in stead. In this context, the out-file value '-' has special meaning: it causes the the textual dump to be written to stdout. The out-file argument may also be omitted, which has the same effect as '-'. The output is identical to what the sieved(1) command produces for a compiled Sieve binary file. Note that this option is not allowed when the out-file argument is a directory. -x "extension extension ..." Set the available extensions. The parameter is a space-separated list of the active extensions. By prepending the extension identi- fiers with + or -, extensions can be included or excluded relative to the default set of extensions. If no extensions have a + or - prefix, only those extensions that are explicitly listed will be enabled. Unknown extensions are ignored and a warning is produced. By default, all supported extensions are available, except for deprecated extensions or those that are still under development. For example -x "+imapflags -enotify" will enable the deprecated imapflags extension along with all extensions that are available by default, except for the enotify extension. AUTHOR
The Sieve implementation for Dovecot was written by Stephan Bosch <stephan@rename-it.nl>. Dovecot was written by Timo Sirainen <tss@iki.fi>. SEE ALSO
sieved(1), sieve-test(1) 4 July 2009 SIEVEC(1)
All times are GMT -4. The time now is 11:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy