Sponsored Content
Top Forums Shell Programming and Scripting [Solved] Disappearing backslash Post 302883737 by Corona688 on Wednesday 15th of January 2014 05:09:33 PM
Old 01-15-2014
That is a useless use of cat.

That aside, read is eating your backslashes here. By default it tries to interpret them. Use read -r to avoid that problem:

Code:
while read -r CMD
do
        echo ldapdelete -h $OIDHOST \"$CMD\"
done < inputfile

This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

backslash issues

Hi, I have a script which looks through an input file and takes data from the file to use within the script. Everything works fine until the script reads the item \windows\directory\structure\ from the input file into a variable. As unix sees the backslash as an escape character, the... (5 Replies)
Discussion started by: Bab00shka
5 Replies

2. UNIX for Dummies Questions & Answers

Disappearing route

I have a route that disappears when the server is rebooted. to get the route back I do: route add 65.x.x.x 10.0.x.x I go to cd /etc/inet vi config and the route is in place Anybody might know what is happening? (4 Replies)
Discussion started by: jrmontg
4 Replies

3. UNIX for Dummies Questions & Answers

Disappearing files

Suse 10.3 ispconfig Using as a web server, mail server. I'm the only user. These files: /var/log/httpd/ispconfig_access_log_2008_08_28 /var/log/httpd/ispconfig_access_log_2008_08_29 vanished without a trace. I still have older and newer files, but not these. I have not deleted... (5 Replies)
Discussion started by: KillerDog
5 Replies

4. UNIX for Dummies Questions & Answers

Escaping backslash

I have a variable containt something like this, c:\mask\mask. How can I escape "\" in the values? I want the value as it it. (9 Replies)
Discussion started by: swmk
9 Replies

5. Windows & DOS: Issues & Discussions

Disappearing wget download [Windows]

I downloaded and installed wget for windows, then used cmd.exe to run it directly from its install folder. I downloaded an 8.5 GB (yes, Giga) tar file, waited a couple of days, then tried to find it only to see that it's nowhere to be found! I don't want to re-download the whole thing, especially... (3 Replies)
Discussion started by: HalfThere
3 Replies

6. UNIX for Advanced & Expert Users

Files disappearing from /users/home

We have seen an issue whereby every morning around the same time , we see files being deleted from /users/$userid . We have many crons and processes running across 40+ different servers . Possibly some rogue process is doing this . How can one isolate the process removing stuff from the... (4 Replies)
Discussion started by: taherkf
4 Replies

7. Solaris

Crontab latest entry disappearing

The latest crontab entry is disappearing time and again on acceptance and production environment. the same entry gets deleted. any pointers to what might be causing this issue? (1 Reply)
Discussion started by: bluenavi
1 Replies

8. Solaris

Crontab latest entry disappearing. plz help

The latest crontab entry is disappearing time and again on acceptance and production environment. the same entry gets deleted. any pointers to what might be causing this issue? (6 Replies)
Discussion started by: bluenavi
6 Replies

9. Shell Programming and Scripting

Replace semicolons with tabulators, new lines are disappearing

Hi Gurus! Example file: 1;AAA;BBB 2;CCC;DDD We want to replace semicolons to tabulators. Like this: 1 AAA BBB 2 CCC DDD We have tried these codes. With PERL: #!/bin/bash for i in `find /folder1/ -name "*.CSV"` do bi="`basename $i awk -F"." {'print $1'}`" cat... (2 Replies)
Discussion started by: JanneN
2 Replies

10. UNIX and Linux Applications

Groups are disappearing on opening of new konsole/terminal

Hi when I open a new KDE/terminal all my project groups are disappearing. help is much appreciated. Thanks Sujay (2 Replies)
Discussion started by: sujaybatni
2 Replies
URI::URL(3)						User Contributed Perl Documentation					       URI::URL(3)

NAME
URI::URL - Uniform Resource Locators SYNOPSIS
$u1 = URI::URL->new($str, $base); $u2 = $u1->abs; DESCRIPTION
This module is provided for backwards compatibility with modules that depend on the interface provided by the "URI::URL" class that used to be distributed with the libwww-perl library. The following differences exist compared to the "URI" class interface: o The URI::URL module exports the url() function as an alternate constructor interface. o The constructor takes an optional $base argument. The "URI::URL" class is a subclass of "URI::WithBase". o The URI::URL->newlocal class method is the same as URI::file->new_abs. o URI::URL::strict(1) o $url->print_on method o $url->crack method o $url->full_path: same as ($uri->abs_path || "/") o $url->netloc: same as $uri->authority o $url->epath, $url->equery: same as $uri->path, $uri->query o $url->path and $url->query pass unescaped strings. o $url->path_components: same as $uri->path_segments (if you don't consider path segment parameters) o $url->params and $url->eparams methods o $url->base method. See URI::WithBase. o $url->abs and $url->rel have an optional $base argument. See URI::WithBase. o $url->frag: same as $uri->fragment o $url->keywords: same as $uri->query_keywords o $url->localpath and friends map to $uri->file. o $url->address and $url->encoded822addr: same as $uri->to for mailto URI o $url->groupart method for news URI o $url->article: same as $uri->message SEE ALSO
URI, URI::WithBase COPYRIGHT
Copyright 1998-2000 Gisle Aas. perl v5.12.5 2011-08-13 URI::URL(3)
All times are GMT -4. The time now is 11:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy