Sponsored Content
Full Discussion: extract only filename
Top Forums UNIX for Dummies Questions & Answers extract only filename Post 302153823 by dnat on Thursday 27th of December 2007 01:56:47 AM
Old 12-27-2007
Thanks a lot!!!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to extract timestamp from the filename?

Hi., My file name is of the format: name_abc_20100531_142528.txt where., my timestamp is of the format: yyyymmdd_hhmmss How to extract the date strring and time string into seperate variables in the shell script, after reading the file as the input? I want to get the variables... (9 Replies)
Discussion started by: av_vinay
9 Replies

2. Shell Programming and Scripting

loop and extract matching filename

i am unable to exact matching filename in the loop. Filename.in file contains Customer_Product_ Information_Customer_Product_ sale_Product_ /home_dir contains files CUST_INFO_990090_1111.csv "1","Customer Product Detail","1000","salary" "1","Information Customer Product... (2 Replies)
Discussion started by: onesuri
2 Replies

3. UNIX for Dummies Questions & Answers

to extract all the part of the filename before a particular word in the filename

Hi All, Thanks in Advance I am working on a shell script. I need some assistance. My Requirement: 1) There are some set of files in a directory like given below OTP_UFSC_20120530000000_acc.csv OTP_UFSC_20120530000000_faf.csv OTP_UFSC_20120530000000_prom.csv... (0 Replies)
Discussion started by: aealexanderraj
0 Replies

4. Programming

to extract all the part of the filename before a particular word in the filename

Hi All, Thanks in Advance I am working on a shell script. I need some assistance. My code: if then set "subscriber" "promplan" "mapping" "dedicatedaccount" "faflistSub" "faflistAcc" "accumulator"\ "pam_account"; for i in 1 2 3 4 5 6 7 8;... (0 Replies)
Discussion started by: aealexanderraj
0 Replies

5. Shell Programming and Scripting

Extract a part of a filename containing a particular word

Hi All, Thanks in Advance Shell Script or Perl Script I am working on a shell script. I need some assistance. My Requirement: 1) There are some set of files in a directory like given below OTP_UFSC_20120530000000_acc.csv OTP_UFSC_20120530000000_faf.csv... (7 Replies)
Discussion started by: aealexanderraj
7 Replies

6. Shell Programming and Scripting

Extract string from filename

Hi I need to extract the string from file name filename: FILENAME_STRUT_01032013_XXXXXXX.TXT I want 01032013 from the above file name. number of characters may differ before the required string but underscores(-) are same number i.e. after second underscore. Please advise on this. ... (2 Replies)
Discussion started by: cnrj
2 Replies

7. UNIX for Dummies Questions & Answers

Extract Date part from the filename

Hi All, I have incoming source files abcmmyy.txt I need to extract the mmyy part from the filename and pass that to a variable . I really appreciate your quick response on this. Thanks raj (7 Replies)
Discussion started by: rajeevm
7 Replies

8. Shell Programming and Scripting

Extract filename from a given string

I want to extract the filename from a string. This is how I have the rawdata ina file /home/sid/ftp/testing/abc.txt /home/sid/ftp/tested/testing/def.txt /home/sid/sftp/date/misc/hij.txt i want a script which would provide me an output like this Directory ... (10 Replies)
Discussion started by: sidnow
10 Replies

9. Shell Programming and Scripting

Extract the filename and write to .txt

I'm new to this forum and also to UNIX scripting. I need a command to extract the filename from the path and write to .txt file. Thanks in advance for your guidance. (23 Replies)
Discussion started by: Ram Kumar_BE
23 Replies

10. UNIX for Beginners Questions & Answers

Extract data before period in filename

Hi, I have some files with these patterns: WI_SCOPE_DATA_CHANGE_2017-09-12_15-30-40.txt WI_SCOPE_BACK_COMPLETE_QUEUE_2017-09-12_15-31-40.txt WI_SCOPE_CURRENT_CHECK_QUEUE_2017-09-12_15-32-40.txt WI_SCOPE_DAILY_PARTY_2017-09-12_15-33-40.txt I want to extract date from filename and save it... (1 Reply)
Discussion started by: Home
1 Replies
OCAML-GETTEXT(1)						  [FIXME: manual]						  OCAML-GETTEXT(1)

NAME
ocaml-gettext - program to manage PO and MO files for OCaml source files. SYNOPSIS
ocaml-gettext --action [extract | compile | install | uninstall | merge] [--extract-command {cmd}] [--extract-default-option {options}] [--extract-filename-option {filename} {options}] [--extract-pot {filename}] [--compile-output {filename}] [--install-language {language}] [--install-category {category}] [--install-textdomain {textdomain}] [--install-destdir {dirname}] [--uninstall-language {language}] [--uninstall-category {category}] [--uninstall-textdomain {textdomain}] [--uninstall-orgdir {dirname}] {--merge-pot {filename}} [--merge-backup-extension {extension}] [--gettext-failsafe [{ignore} | {inform-stderr} | {raise-exception}]] [--gettext-disable] [--gettext-domain-dir {textdomain} {dir}] [--gettext-dir {dir}] [--gettext-language {language}] [--gettext-codeset {codeset}] [--version | --short-version | -help | --help] [file...] DESCRIPTION
This manual page documents briefly the ocaml-gettext command. --action extract Files provided are considered to be OCaml source files and ocaml-gettext tries to extract translatable strings of it. The output of the command is a POT file. As a special case, if a file named POTFILES is in the list of the file provided, every line of it is considered as a file to be searched. --action compile Files provided are considered to be PO file. These files are compiled in binary MO files, --action install Files provided are considered to be MO files. They are installed in their respective directories considering language, textdomain and category, --action uninstall This is the symmetric command to install, but it uninstalls files provided for the considered language, textdomain and category, --action merge Merges a POT file with the provided PO file. --extract-command cmd Command to extract translatable strings from an OCaml source file. This command should output the same marshalled structure as ocaml-xgettext. The best to do is to use the same build version of ocaml-gettext. --extract-default-option options Default options used when extracting translatable strings. These options are camlp4 options and will be passed to ocaml-xgettext when processing files that don't already have specific camlp4 options. --extract-filename-option filename options Specific filename camlp4 options. It is used when extracting strings from the specified filename. It overrides default camlp4 options. --extract-pot filename POT file to write when extracting translatable strings. --compile-output filename MO file to write when compiling a PO file. If not provided, the output will be the name of the PO file with ".mo" extension. --install-language language Language to use when installing a MO file. --install-category category Category to use when installing a MO file. --install-textdomain textdomain Textdomain to use when installing a MO file. --install-destdir dirname Base directory to use when installing a MO file. --uninstall-language language Language to use when uninstalling a MO file. --uninstall-category category Category to use when uninstalling a MO file. --uninstall-textdomain textdomain Textdomain to use when uninstalling a MO file. --uninstall-orgdir dirname Base directory used when uninstalling a MO file. --merge-pot filename POT file to use as a master for merging PO file. --merge-backup-extension extension Backup extension to use when moving PO file which have been merged. --version Return version information on ocaml-gettext. --short-version Returns only the version of ocaml-gettext. The return is made to be easily parseable by configure script. The output of this command will always be the shortest version string, made of numeric characters (0-9) and ".". The version strings should be compared considering that a version A is greater than a version B if there is a number between two "." of A that is greater than B the corresponding number, beginning at the right of the string. For example: 0.14 is greater than 0.13.1. -help, --help Displays the help about the ocaml-gettext command. OCAML-GETTEXT OPTIONS This section describes briefly the common options provided by programs using ocaml-gettext library. --gettext-failsafe ignore Defines the behaviour of ocaml-gettext regarding any error that could be encountered during the processing of string translation. ignore is the default behaviour. The string returned is the original string untranslated. This behaviour is consistent and allows to have a usable output, even if it is not perfect. --gettext-failsafe inform-stderr Same behaviour as ignore, except that a message is printed on stderr, --gettext-failsafe raise-exception Stops the program by raising an exception when an error is encountered. --gettext-disable Disables any translation made by ocaml-gettext. All translations return the original string untranslated. --gettext-domain-dir textdomain dir Defines a dir to search for a specific domain. This could be useful if MO files are stored in a non standard directory. --gettext-dir dir Adds a directory to search for MO files. --gettext-language language Sets the language to use in ocaml-gettext library. The language should be POSIX compliant. The language should follow the following convention: lang[_territory][.charset][@modifier]. The lang and territory should be two letters ISO code. Charset should be a valid ISO character set (at least recognised by the underlying charset recoding routine). For example, valid languages are: fr_FR.ISO-8859-1@euro, de_DE.UTF-8. --gettext-codeset codeset Sets the codeset for output. Users should be aware that these command line options, apply only for strings after the initialisation of the library. This means that if the options initially guessed by ocaml-gettext don't match the command line provided, there should be some untranslated string, because these strings are translated before parsing options. This is particularly true for the usage message itself (--help): even if the strings are translated, they are translated before setting the correct option. Some options (--gettext-codeset for example) are overrided internally for particular use. It should be required to always translate strings to UTF-8 in graphical user interface (because GTK2 requires it). NOTES
Options --uninstall-language, --uninstall-textdomain, --install-language and --install-textdomain could be guessed from the filename provided. You must be aware that these options can conflict with the fact that you provide several files to install. For example, if you provide a textdomain, you should either install several MO files which filenames only reflect the language or only one MO file if you also provide a language. For example, you can execute ocaml-gettext --install-textdomain mytextdomain fr.po de.po without problem, but you cannot execute ocaml-gettext --install-textdomain mytextdomain --install-language fr fr.po de.po . This restriction is due to the fact that you should not over specified file installation. Rules for guessing the language/textdomain are: language[.textdomain].mo. For a full automated install without giving any hints, through command line options, you should name your file fr.mytextdomain.mo or de.mytextdomain.mo. SEE ALSO
ocaml-xgettext(1) ocaml-gettext(5) ocaml-gettext 2008-04-29 OCAML-GETTEXT(1)
All times are GMT -4. The time now is 03:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy