Sponsored Content
Full Discussion: Need to remove slash
Top Forums Shell Programming and Scripting Need to remove slash Post 302851309 by bartus11 on Sunday 8th of September 2013 05:32:21 AM
Old 09-08-2013
If your output is from some script:
Code:
some_script.sh | sed 's/^\///;s/\// /g'

 

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

awk slash

I have configuration file(master.cnf), that contents are: VER1LOG /src/ver1/log VER2LOG /src/ver2/log APPLOG /src/sys/apps/log APPCONF /src/sys/apps/conf APPBIN /src/sys/apps/bin my shell script is as below mylog=sys/apps awk "/$mylog/" master.cnf awk: syntax error Context is: >>> ... (6 Replies)
Discussion started by: McLan
6 Replies

3. Shell Programming and Scripting

Replace the last slash alone

Hi All, Can you please help me with the below issue. I want only the last slash to be replaced with space. 06/05/2008/EDED_FD_BDCD_ABCD_123 06/05/2008 EDED_FD_BDCD_ABCD_123 (3 Replies)
Discussion started by: christineida
3 Replies

4. Shell Programming and Scripting

About \ (Back slash)

Hi All, print "path/executable_file parameters" \ > path/file1 print "path/executable_file parameters" \ > path/file2 print "path/executable_file parameters" \ > path/file3 chmod 775 path/file1 \ path/file2 \ ... (7 Replies)
Discussion started by: Arunprasad
7 Replies

5. UNIX for Advanced & Expert Users

Substitute single backward-slash with the double backward-slash

Hi, I have a path like this c:\test\sample\programs, i need to change thiis to c:\\test\\sample\\programs. How to perform this? I tried tr command but it didn't help me. Thanks Vijayan (3 Replies)
Discussion started by: mvictorvijayan
3 Replies

6. 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

7. Shell Programming and Scripting

Slash delimiter

I have a log file which on field $11 there is sth like: /A/B/C and I want to extract the last part which is C. for space delimiter I used: awk '{print $2 " " $5 ";" $7 ";" $9 ";" $11}' and had no problem. but dont know how to extract the 3rd part of the slash delimiter. That would be... (6 Replies)
Discussion started by: frhling
6 Replies

8. Shell Programming and Scripting

Remove leading dot and slash on relative paths with find

When I specify a directory by name the leading ./ is not shown: $ find somedir/ somedir/a.bin somedir/target/out.binBut when I specify current dir it adds the ./ to the beginning of each result: $ find . | grep somedir ./somedir/a.bin ./somedir/target/out.binIs there any particular reason why... (2 Replies)
Discussion started by: Tribe
2 Replies

9. Shell Programming and Scripting

Substitution to remove tailing slash?

Heyas I am trying to remove a tailing space, with substitution. Already tried some multiple escapes with no luck, is that even possible? echo $CHROOT || \ CHROOT="${CHROOT/\/$}" echo $CHROOT return And all i get is: :) paths $ CHROOT=/usr/local/ + paths $ . * /usr/local/ /usr/local/... (2 Replies)
Discussion started by: sea
2 Replies

10. Shell Programming and Scripting

Escaping Forward Slash

./split2.sh: line 1: split/ssl/pop3s.txt: No such file or directory sort: cannot read: split/ssl/pop3s.txt: No such file or directory Hi there, I am pulling data from the following source: ssl/http ssl/http ssl/http-alt ssl/https ssl/https ssl/https ssl/https ssl/https ssl/https... (3 Replies)
Discussion started by: alvinoo
3 Replies
micro-httpd(8)							   User Commands						    micro-httpd(8)

NAME
micro-httpd - really small HTTP server SYNOPSIS
micro-httpd DIRECTORY OPTIONS
None. DESCRIPTION
micro-httpd is a very small HTTP server all in 150 lines of code. It runs from inetd, which means its performance is poor. But for low- traffic sites, it is quite adequate. It implements all the basic features of an HTTP server, including: * Security against ".." filename snooping. * The common MIME types. * Trailing-slash redirection. * index.html * Directory listings. To install it, add a line like this to /etc/inetd.conf: micro-http stream tcp nowait nobody /usr/sbin/micro-httpd micro-httpd dir Make sure the path to the executable is correct, and change "dir" to be the directory you want to serve. You could add line like this to /etc/services: micro-http port/tcp #Micro HTTP server Change "port" to the port number you want to use: 80, 8000, whatever. Restart inetd by sending it a "HUP" signal. On some systems, inetd has a maximum spawn rate - if you try to run inetd services faster than a certain number of times per minute, it assumed there is either a bug of an attack going on and it shuts down for a few minutes. If you run into this problem - look for syslog messages about too-rapid looping - you will need to find out how to increase the limit. Unfortunately this varies from OS to OS. On FreeBSD, you add a "-R 10000" flag to inetd's initial command line. On some Linux systems, you can set the limit on a per-service basis in inetd.conf, by changing "nowait" to "nowait.10000". Note that you can use micro-httpd to serve HTTPS, if you like, by running it from stunnel. First fetch and install stunnel - FreeBSD users can just go to /usr/ports/security/stunnel and do a "make cert ; make install". Then as root run: stunnel -p /usr/local/certs/stunnel.pem -d 443 -l /usr/sbin/micro-httpd -- micro-httpd dir Make sure the paths to the certificate and executable are correct, and again don not forget to change "dir" to the directory you want to serve. ENVIRONMENT
None. FILES
None. SEE ALSO
inetd(8) micro-inetd(8) xinetd(8) AUTHORS
Copyright (C) 1999 Jef Poskanzer <jef@mail.acme.com>. All rights reserved. This manual page was updated by Jari Aalto <jari.aalto@cante.net>. Released under license GNU GPL v2 or (at your option) any later version. For more information about license, visit <http://www.gnu.org/copyleft/gpl.html>. micro-httpd 2012-04-03 micro-httpd(8)
All times are GMT -4. The time now is 05:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy