Sponsored Content
Top Forums Shell Programming and Scripting sed - how to remove trailing slashes Post 302357363 by 64mb on Tuesday 29th of September 2009 12:57:00 PM
Old 09-29-2009
I should have realised that Smilie

Thank you vgersh99 and Franklin52 Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sed command for using with back slashes

hi all, im trying to use a sed command to remove all occurenes of \p\g what i used so far is : sed 's!\p\g!!g' file but this doesnt work ? Any ideas, thanks for helping. (2 Replies)
Discussion started by: seaten
2 Replies

2. UNIX for Dummies Questions & Answers

How to remove trailing spaces

Hi, I have a file like this (ADD_MONTHS((Substr(Trim(BOTH FROM Translate(Maximum(closeDa ------------------------------------------------------------ 2007-06-30 00:00:00 I have a requirement where i need just the date. When i do: tail -1... (2 Replies)
Discussion started by: mahek_bedi
2 Replies

3. Shell Programming and Scripting

Remove trailing G

Hello, I am trying to write a script that will calculate the amount of data remaining in a storage volume. I'm running Tru64 Unix version 5.1B patch kit 6. The script is being run against an AdvFS domain. I am programming in Korn Shell version M-11/16/88f. The basic idea is that I want to run df... (3 Replies)
Discussion started by: Heathe_Kyle
3 Replies

4. Shell Programming and Scripting

trimming trailing slashes in variable

I'm using this thread as an example, but can't seem to apply it to my situation. I'm trying to strip the trailing slash (/) from an input argument. Here's a snippet of my command line input and the troublesome code: $ script_name -s "../pathname/dir/" snip 8< ... while getopts :s:... (5 Replies)
Discussion started by: ricksj
5 Replies

5. UNIX for Dummies Questions & Answers

Remove Colons and Slashes from 2nd Token

I would prefer to use Sed, but I will do whatever necessary. I want to know a good way to remove ":" and "/" from the first string surrounded in Double quotes, but not the 2nd. Current File: "9781238274584-Ace of Spades: The Poop" "Ace of Spades: The Poop" ...Desired: "9781238274584-Ace of... (6 Replies)
Discussion started by: glev2005
6 Replies

6. Shell Programming and Scripting

How to use sed when a match has forward slashes

I'm trying to replace an alias with its match using sed but the match contains forward slashs so it causes the sed command to throw a garbled message.. cmd_list.txt sample AIX_myserver_1011_vintella.sudoers_cmndalias sample I'm trying to use the below but like I say it throws a... (5 Replies)
Discussion started by: Jazmania
5 Replies

7. Shell Programming and Scripting

Using SED to copy/paste with slashes and tabs.

I have: 2012/01_January/Kite/foldername/otherfoldername/placeholderBlue I want to end up with: /foldername/otherfoldername/2012/01_January/Kite/Blue Basically take everything before the first tab and put it in the place of the consistently named word placeholder and add a slash in place... (2 Replies)
Discussion started by: crowman
2 Replies

8. Shell Programming and Scripting

Remove trailing zeros

Hi I have a simple request but can't find the answer. I want to remove trailing zeros, and in some cases the fullstops, from the input data. Example of input file: FR002_15.000_20.000 SD475_5.000_10.500 FG5647_12.250_15.500 BH2463_30.555_32.000 Desired output file would be: ... (10 Replies)
Discussion started by: theflamingmoe
10 Replies

9. Shell Programming and Scripting

Remove trailing 0 from the field

Hi Freinds, I have file1.txt as below file1.txt 1521894~~-0.400~201207 1521794~~-0.486~201207 152494~~-0.490~201207 152154894~~-0.490~201207 1521894354~~-0.489~201207 expected output : 1521894~~-0.4~201207 1521794~~-0.486~201207 152494~~-0.49~201207... (9 Replies)
Discussion started by: i150371485
9 Replies

10. Shell Programming and Scripting

Remove trailing number

I have some strings such as ABC1 ABC2 TYFASDD12 They will only have letters and numbers. In each case I want to remove the last digit? The lengths will vary. So a hard coded substr won't work. What do I do? if it doesn't end in a number, I don't want to remove any characters. (6 Replies)
Discussion started by: guessingo
6 Replies
ELIOMC(1)						      General Commands Manual							 ELIOMC(1)

NAME
eliomc, eliomcp, eliomopt, js_of_eliom, eliomdep - the eliom build tools SYNOPSIS
eliomc [options] files eliomcp [options] files eliomopt [options] files eliomdep [options] files js_of_eliom [options] files -o filename.js DESCRIPTION
eliomc, eliomcp and eliomopt are wrapper around the OCaml compiler that ease the compilation of the server part of projects based on the Eliom framework. They respectively accept the same set of option than the ocamlc(1),ocamlcp(1) and ocamlopt(1) compilers plus the specific ones described in the OPTIONS section. js_of_eliom is a wrapper around the OCaml and Js_of_ocaml compilers that ease the compilation of the client part of projects based on the Eliom framework. It accepts the same set of option than the ocamlc(1) compiler plus the specific ones described in the OPTIONS section. eliomdep is a wrapper around ocamldep(1) that handles dependencies of an .eliom source files. It accepts the same set of options plus the specific ones described in the OPTIONS section. Warnings: this tools is still limited and do not handle dependencies towards an .eliom files. COMPILING ELIOM SOURCE FILES
The compilation of files with a .eliom extension is achieved in three steps: infer the type of value sent by the server to the client; com- pile the server part of the code and compile the client part. The first two steps can be realised with eliomc and the last one with js_of_eliom. Both tools produce a .cmo file named as the original .eliom file. To avoid overwriting the .cmo representing the server part with .cmo of the client part, files generated by eliomc or eliomopt are stored by default in a subdirectory named _server and files generated by js_of_eliom are stored in a subdirectory named _client. Those default directories could be respectively overridden by the environment vari- ables ELIOM_SERVER_DIR and ELIOM_CLIENT_DIR. The types infered by eliomc for values sent by the server to the client are stored in an intermediate files named as the original .eliom file and whose extension is .type_mli. That file is required by js_of_eliom for compiling the client part of the .eliom file. The eliomdep tool correctly generate dependencies that intermediate file for the server .cmo and the client .cmo. OPTIONS
-dir <dir> Specify the target directory for generated files -package <name> This is the same option as the ocamlfind one. -predicates <p> This is the same option as the ocamlfind one. -ppopt <opt> Append <opt> to preprocessor invocation. -jsopt <opt> Append <opt> to js_of_ocaml invocation (js_of_eliom only). -infer <opt> For .eliom file, only generate the intermediate .type_mli file (eliomc and eliomopt only). -noinfer <opt> For .eliom file, do not generate the intermediate .type_mli file (eliomc and eliomopt only). -help or --help Display a short usage summary and exit. EXAMPLES
The compilation of an Eliom projects composed of a server specific file named server.ml, a client specific file named client.ml and two common files name base.eliom and main.eliom, could be achieved with the following commands: eliomc -a -o appl.cma server.ml base.eliom main.eliom js_of_eliom -o appl.js client.ml base.eliom main.eliom To avoid recompiling the whole project each times, this could be split in multiple steps: eliomc -c server.ml eliomc -c base.eliom eliomc -c main.eliom eliomc -a -o appl.cma _server/server.cmo _server/base.cmo _server/main.cmo js_of_eliom -c client.ml js_of_eliom -c base.eliom js_of_eliom -c main.eliom js_of_eliom -o appl.js _client/client.cmo _client/base.cmo _client/main.cmo SEE ALSO
ocamlc(1), ocamlopt(1), js_of_ocaml(1), ocamlfind(1), ocamlcp(1), ocamldep(1). AUTHOR
eliomc, js_of_eliom, eliomdep and eliomopt were written by Gregoire Henry <gregoire.henry@pps.jussieu.fr>. This manual page was written by Pierre Chambart <chambart@crans.org>. 2012-02-15 ELIOMC(1)
All times are GMT -4. The time now is 11:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy