Sponsored Content
Full Discussion: Escaping Forward Slash
Top Forums Shell Programming and Scripting Escaping Forward Slash Post 303004758 by RudiC on Sunday 8th of October 2017 08:46:56 AM
Old 10-08-2017
What do you want to escape?
What is ./split2.sh: line 1:?
Does whatever your Code is work with the first eleven lines in your "source" (which I guess is called "commontypes.txt")?
How is line 12 different?

Last edited by RudiC; 10-09-2017 at 10:50 AM.. Reason: typo
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

grep for forward slash

How can I use grep to grab a line that contains a forward slash? I've tried: grep "/pd " file, Inevitably it just grabs pd not /pd. (3 Replies)
Discussion started by: wxornot
3 Replies

2. Shell Programming and Scripting

Help with SED and forward slash

Using the script: (Called replaceit) #!/bin/ksh String=$1 Replace=$2 sed -e "s/${orig}/${new}/g" oldfile.txt > newfile.txt In oldfile.txt, I'm looking for: getenv("Work") And change it To: /u/web I execute the script: replaceit "getenv(\""Work\"")" /u/web I'm getting sed... (3 Replies)
Discussion started by: gseyforth
3 Replies

3. Shell Programming and Scripting

escaping / (forward slash)

how to escape / (forward slash) in a string. I have following scnerio: sed s/${var1}{$var2} var1 and var2 both contain slashes, but sed gives error if there is a slash in var1 or var2. sed is used here to replace var1 with var2. Thanks in advance (1 Reply)
Discussion started by: farooqpervaiz
1 Replies

4. Shell Programming and Scripting

Using sed to append backward slash before forward slash

Hi all, I need to know way of inserting backward slash before forward slash. My problem is that i need to supply directory path as an argument while invoking cshell script. This argument is further used in script (i.e. sed is used to insert this path in some file). So i need to place \ in front... (2 Replies)
Discussion started by: sarbjit
2 Replies

5. Shell Programming and Scripting

Significance of forward slash(/) while specifying a directory

What is the significance of the forward slash(/) while specifying a directory? cp -av /dir/ /opt/ and cp -av /dir /opt Does effectively the same job it seems? (2 Replies)
Discussion started by: proactiveaditya
2 Replies

6. UNIX for Dummies Questions & Answers

Replace Forward Slash with sed

i need to replace '/' forward slash with \/(backward slash follwed by a forward slash) using sed command when the forward slash occurs as a first character in a file.. Tried something like this but doesn't seem to work. find $1 -print0 | xargs -0 sed -i -e 's/^\//\\\//g' Can someone... (19 Replies)
Discussion started by: depakjan
19 Replies

7. Shell Programming and Scripting

AWK or SED to replace forward slash

hi hope somebody can help, there seems to be bit on the net about this, but still cant make it work the way i need. i have a file live this mm dd ff /dev/name1 mm dd ff /dev/name2 mm dd ff /dev/name3 mm dd ff /dev/name4 i need to update /dev/name1 etc to /newdev/new/name1 etc so... (5 Replies)
Discussion started by: dshakey
5 Replies

8. UNIX for Dummies Questions & Answers

Awk pattern with letters and forward slash

Hi, I have a tab delimited file "test.txt" like this: id1 342 C/T id2 7453 T/A/-/G/C id3 531 T/C id4 756 A/T/G id5 23 A/G id6 717 T/A/C id7 718 C/T/A And so on, with the possible choices for letters being A,C,T,G. I would like to exclude from my file all the lines that do not have... (3 Replies)
Discussion started by: francy.casa
3 Replies

9. UNIX for Dummies Questions & Answers

Issues with sort and forward slash

I have some directories I am trying to sort. When I attempt to sort them and they are in this format, everything works great: file /vol/trees10 /vol/trees2 /vol/trees7 cat file |sort -ts -k2 -n /vol/trees2 /vol/trees7 /vol/trees10 This makes thefiles in the order... (9 Replies)
Discussion started by: newbie2010
9 Replies

10. UNIX for Beginners Questions & Answers

Replace string until 3Rd occurance of forward slash(/)

I have a file abc.txt which has records like 456 /home/fgg/abdc.txt 3567 /home/fdss/vfgb.txt 23 /home/asd/dfght.txt I WANT TO REMOVE STRING UNTIL 3RD OCCURANCE OF FORWARD SLASH Output should be like abdc.txt vfgb.txt dfght.txt (5 Replies)
Discussion started by: himanshupant
5 Replies
resgen(resgen 1.0)														resgen(resgen 1.0)

NAME
resgen, resgen2 - Mono/CLI Resource Generator SYNOPSIS
resgen source.ext [dest.ext] resgen /compile source.ext[,dest.resources] [...] resgen2 DESCRIPTION
Convert a resource file from one format to another. The currently supported formats are text, resources, resx and po. .txt, .text Used to process text files, the format of the text file is of the form: key=value The value argument can contain special characters as long as they are escaped. The escape sequences currently supported are , , , \ (to get the escape sequence itself) and with resgen2 unicode escape sequences are supported with the uXXXX escape sequence, where XXXX is a four digit number. Lines that start with the # or ; character are considered comments and ignored. '.resources' This is the binary file format implemented by the System.Resources.ResourceReader class, part of mscorlib.dll '.resx' This is the binary file format implemented by the System.Resources.ResXResourceReader class. This class is not part of mscor- lib.dll, this class is part of System.Windows.Forms. '.po'. PO files are the source files used by the Unix gettext infrastructure that is typically used to internationalize applications. Lines starting with the '#' character are comment lines. The file contains many instance of strings like this: msgid KEY msgstr VALUE The KEY is typically the string to translate and the VALUE is the translation. On PO files instead of using codes as the KEY (as it is customary with resource files) the KEY is typically a complete english message that applications embed in their source code and will be used as a fallback if no translation resources are used. Since resources are key value pairs, the extended features in PO files are not supported (plurals and support for N-cases). To learn more about the po file format, use your info browser and point it to the "(gettext)PO Files" node. If the destination file is not specified, source.resources will be used. The /compile option takes a list of .resX or .txt files to convert to the output file name. OPTIONS
-compile This switch instructs resgen to compile multiple files. It must appear before any resources are specified on the command line. -usesourcepath This option is only available for resgen2, and it instructs resgen to resolve relative paths using the directory of the resx file as current directory. FILES
This program will load referenced assemblies from the Mono assembly cache. MAILING LISTS
Visit http://lists.ximian.com/mailman/listinfo/mono-devel-list for details. WEB SITE
Visit: http://www.mono-project.com for details SEE ALSO
mcs(1),mono(1),mono-config(5). resgen(resgen 1.0)
All times are GMT -4. The time now is 02:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy