Sponsored Content
Top Forums Shell Programming and Scripting Sed: removes \ from text which causes issues Post 302798093 by hanson44 on Tuesday 23rd of April 2013 08:03:21 PM
Old 04-23-2013
I would try the following, putting escaped "double quotes" around the SHOW variable. I cannot guarantee it will work, as the testing is a bit awkward, but I think a good chance it will work:
Code:
sed "113a\mv -v $DISK2/\"$SHOW\"\\\ folder2 $DISK/\"$SHOW\"/$FOLDER1" test3.sh > test2.sh

If possible to remove those blanks from files names, I would encourage that. Those blanks in file names cause so many irritations. Smilie
 

10 More Discussions You Might Find Interesting

1. Linux

Plain Text printing issues

I'm attempting to print to a networked konica printer. No linux drivers that I know of exist, but we've always used HP 5si drivers and have had good results. We just loaded a box up with CentOS 5, and now when we print any sort of file from the command line (lp -dkonica <filename>), the text is... (0 Replies)
Discussion started by: fender177
0 Replies

2. Shell Programming and Scripting

sed issues

Hi guys, not that used to using sed beyond the simple substitution. I am trying to check for a program (program1) and if it exists replace the standard output "program1" with a "program1(part1 part2) output if said program exists. SW="program1 program2" PROGRAM_TEST='echo "$SW" | grep... (3 Replies)
Discussion started by: mikepegg
3 Replies

3. Shell Programming and Scripting

sed edit in place -i issues

Hello, I am attempting to create a command that I can eventually put into a loop so I can edit 1file on many servers. I would like to edit the file in place with sed -i. If not I will take any suggestions on how to use a temp file. I need to remove a email address from the configuration file... (4 Replies)
Discussion started by: abacus
4 Replies

4. Shell Programming and Scripting

sed command removes lines in file

Hi, I am modifying a file with sed command. i want to make SCORE= blank in the file whereever SCORE=somevalue. What will *$ do in the below command? cat $file | sed 's/SCORE=.*$/SCORE=\r/g' > newfile The last line is also missing in the new file. How to make SCORE='100' to SCORE=... (5 Replies)
Discussion started by: ashok.k
5 Replies

5. UNIX for Dummies Questions & Answers

Sed to remove only first line erroneously removes last line too

Hello everyone, This is my first posting. I have read the rules of this forum. I have searched many various threads and haven't found one that applies to my situation or suggestions to fix the issue. I do appreciate the help. I am trying to execute a basic UNIX script in a Solaris... (4 Replies)
Discussion started by: dqrgk0
4 Replies

6. UNIX for Advanced & Expert Users

perl/sed -i removes link

hello, is it a behavior of or that "-i" removes unix link . example : i create a file "src_file" and link it to "link_file" and then i start "perl -i" the link is removed. does another option exists to change content of a file without temporary files ? UNIX-Version: HP-UX and... (2 Replies)
Discussion started by: bora99
2 Replies

7. Shell Programming and Scripting

Issues with sed on SunOS

Why does the below command doesnt work fine on SunOS 5.10 $ cat t | AK| | | | | DS | | | | tAR | | | | | FIL | $ sed -e 's/^ *//g' -e 's/ *$//g' -e 's/ *| */|/g' t |AK|||||DS|||| tAR|||||FIL| ##notice before tAR works fine on Linux OR AIX though ... (8 Replies)
Discussion started by: Shivdatta
8 Replies

8. Shell Programming and Scripting

Issues in sed command

I use SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux We have a user-defined command called "submit" which will open a vi terminal in which we need to enter the description at 24th line and save it. In order to simplify this, i decided to create another command in which the... (3 Replies)
Discussion started by: pandeesh
3 Replies

9. Shell Programming and Scripting

Issues with using sed with word delimiters \< and \>

sed is not applying /d "delete line" option when I also include match word options \< and \> examples... echo cat | sed '/\<cat\>/d' will return cat for some reason echo cat | sed "/\<cat\>/d" will also still return cat. Of course I can just run this... echo cat | sed '/cat/d' and... (1 Reply)
Discussion started by: escooter87
1 Replies

10. Shell Programming and Scripting

sed or awk removes attachment in email

Hi We have a requirement to send email using shell script.email should have html body and pdf attachment. We used uuencode for attaching files and sendmail option to acheive and it is working fine. However custoemr wants to make body of email slightly dynamic. E.g dear customer in html file... (3 Replies)
Discussion started by: Harish7586
3 Replies
GO-SHOW-PATHS-TO-ROOT(1p)				User Contributed Perl Documentation				 GO-SHOW-PATHS-TO-ROOT(1p)

NAME
go-show-paths-to-root.pl - shows all possible paths from a term to the top SYNOPSIS
go-show-paths-to-root.pl -id GO:0008021 ontology/gene_ontology.obo go-show-paths-to-root.pl -names -id GO:0008021 ontology/gene_ontology.obo DESCRIPTION
traverses DAG showing all paths (terms and intervening relationships) to the root This script is purely file based; it needs to parse the ontology each time Subsequent parses can be speeded up using the use_cache option If you wish to use the GO MySQL db, see the script go-db-show-paths-to-root.pl in the go-db-perl distribution ARGUMENTS
-e ERRFILE writes parse errors in XML - defaults to STDERR (there should be no parse errors in well formed files) -p FORMAT determines which parser to use; if left unspecified, will make a guess based on file suffix. See below for formats -use_cache If this switch is specified, then caching mode is turned on. With caching mode, the first time you parse a file, then an additional file will be exported in a special format that is fast to parse. This file will have the same filename as the original file, except it will have the ".cache" suffix. The next time you parse the file, this program will automatically check for the existence of the ".cache" file. If it exists, and is more recent than the file you specified, this is parsed instead. If it does not exist, it is rebuilt. DOCUMENTATION <http://www.godatabase.org/dev> perl v5.14.2 2010-05-12 GO-SHOW-PATHS-TO-ROOT(1p)
All times are GMT -4. The time now is 03:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy