General :: Escape Forward Slash But Not Working Statement Garbled?

May 2, 2011

I am trying to use sed command to repalce one string with other but somehow replacement string contains forwards slash hence getting the error statement garbled!


View 4 Replies


Programming :: Escaping Forward Slash In Sed Command?

Nov 2, 2010

i want to replace

Code: <>2.0.0-SNAPSHOT</> with
Code: <>2.0.0-b-20</> using sed command. Code: sed -i


I think there is a problem with front-slash but not sure how to resolve it.

View 2 Replies View Related

Debian Programming :: Sed Cannot Delete Forward Slash In While Loop?

Aug 14, 2014

I am downloading online videos with a bash script this is the code of script

Code: Select all#!/bin/bash
while read line
"/usr/bin/wget" $line
sed -i "/$line/d" urls
done  <urls

The while loop read the videos url from the urls file and parse them to the wget for dwonlaod, i write the wget for easy of exmple in this code otherwise i use another script to downlaod the embed videos , the code

Code: Select allsed -i "/$line/d" urls delete the url of videos from the urls file when it is download is complete.

The problem is http address contain the foreward slashes "/" and sed cannot delete them and get error, this is the urls file:

Code: Select all

This is output of the

Code: Select all# ./
sed: -e expression #1, char 8: unknown command: `/'

[Code] .....

View 3 Replies View Related

Programming :: Escape '*' In Case Statement Bash

Jan 23, 2010

Does it possible to escape * in the case statement


View 2 Replies View Related

Programming :: Shell Script For Adding A Statement In A File After A Particular Statement?

Jun 28, 2010

We are building our C++ project in Kdevelop IDE. Every time we run "Run Configure" from the "Build" menu, a file named "libtool" gets automatically generated. This file contains a statement as "ECHO="echo"".f we run "Automake", without modifying the "libtool" the system hangs and theputer needs to be restarted.Therefore every time we run "Run Configure" we need to include the line "echo="echo"" below the statement "ECHO="echo"" manually.I think a script can be written which does the above on its own.I am not a shell script programmer, I know the good tutorials for shell scripts are available on the net, but learning scripting only for this task would be time-consuming and painful.

View 4 Replies View Related

General :: Remove / (slash) And Replace - (semi-colon) With New Line

May 6, 2011

I need to have a shell script which does the following,

1. Remove '/' in the file
2. Replace ';' with new line

Input file (sample):


Output file should be:

View 2 Replies View Related

Programming :: Perl Switch Statement Throwing Error Like Bad Case Statement (invalid Case Value)?

Oct 6, 2010

I've written a simple perl code to learn switches in perl.My code is pasted below,

$opt = 1;
switch($opt) {


View 3 Replies View Related

General :: Firefox 3.5.2 - Sound Gets Garbled And Echoic

Jan 30, 2011

I run slackware 13.0 with firefox 3.5.2. The sound works great for the most part. But sometimes after the browser has been open for more than a few hours, and after a few hulu and ..... visits, I start up another movie and the sound is all jarbled and echoy. So I just 'pkill firefox' Run firefox and restore the sessions and everything is back to normal. Seems like it's just a firefox bug.

View 2 Replies View Related

Software :: Exim4 Forward Emails Not Working?

May 4, 2011

Running exim4 on debian and trying to forward all emails destined for to, I did setup the entry in the /etc/alias file in the following way:


run newaliases restart exim "although not needed if I am not mistaken"

then on command line mail and the email still goes out for and not I am using a smarthost, and that smarthost refuses to serve emails going for root@. I am OK with that as I should be able to easily rewrite those message to go to

But it is simply not working, anything I might have missed here ?

View 3 Replies View Related

General :: Flash Videos Playback - Sound Garbled And Distorted

Aug 11, 2010

I play a flash video, and then play music natively the sound doesn't work. Or I can play flash and have sound but not play music with sound that's on my PC. Or I play my music on my PC, say one song, and the other is high pitched distorted, and rings. I have to exit the program and start it again for it to play nice. How do I resolve this most irritating bug?

View 2 Replies View Related

Ubuntu :: Back - Up - Forward Navigation Not Working Properly

Aug 17, 2010

I installed Ubuntu 10.04 on my systems. In the file browser or any internet browser, if I click on back, forward or up, nothing happens. I stays on the current page/location. Even if goes back, sometimes, it again comes back automatically to current page/location. I can navigate using keyboard but not with mouse.

System Configuration:
Processor: Core 2 Quad 2.5 GHz
Motherboard: Intel Desktop Board DG41RQ.

View 2 Replies View Related

General :: Regex Escape The Comma?

Aug 12, 2010

sometimes there are one, sometime there are two exchanges in this log file. the 100= is the stock exchange- if there are two, they are seperated by a comma. i understand how to escape a comma in a regex, but I am having trouble with combining it.

35=8 39=1 38=1000 32=13 14=754 31=1.11 44=1.1 100=AMEX,ISE
35=8 39=1 38=1000 32=151 14=205 31=1.1 44=1.1 100=AMEX
35=U 39=2 38=1000 32=45 14=184 31=1.1 44=1.1 100=AMEX,ISE


View 11 Replies View Related

General :: Escape Commands In A Bashrc Alias?

Sep 17, 2010

I need to occasionally touch a file with the current timestamp as the filename. I would do so this way:

touch `date "+%Y-%m-%d_%H-%M"`.txt

However, I'd like to define an alias for this. When I try adding to the bashrc this:

alias td="touch `date "+%Y-%m-%d_%H-%M"`.txt"

the result is that the filename is the same during the entire session, since the `date ..` gets calculated just once during login...

How can I get the command to expand only when I call the alias? Or must I use a function for this?

View 1 Replies View Related

General :: Substituting Lines In Files Without Need To Escape?

Jan 17, 2011

Usually when I need to replace some lines in a file, the first tool that comes to mind is sed -i:

sed -i 's|tool:.*|tool: some-tool|'

However, it's inconvenient when there are . characters in the replacement string:

sed -i 's|host:.*|host:|' Is there a better tool for this case?

View 1 Replies View Related

General :: Escape Characters In Watch Command

Oct 20, 2009

Need little advice running this command.
watch -d 'ps aux | awk '{print $4" "$11}' | sort | uniq -c | awk '{print $2" "$1" "$3}' | sort -nr | head'

I get this error message from AWK. awk: cmd. line:1:
{print awk: cmd. line:1: ^ unexpected newline or end of string

I have tried all the usual by trying to escape the single and double quotes in the command but same result. The end result should be the a listing of memory hungry processes that are scanned every 2 seconds (watch default value).

View 2 Replies View Related

General :: Fedora14 Want To Mount Joliet Cd Escape Seq 25,2f,40

May 3, 2011

i have a cd that shows you an empty directory unless you mount it for the joliet extensions - specifically 25 2f 40. It uses wide characters with the high half null.

View 3 Replies View Related

General :: Cd Inside If Than Statement After Fi Back To Old Dir

Jul 12, 2010

the script below prints the pwd of where I want to be. after the fi it puts me back at the original dir. just writing these scripts to understand what's going on.

#! /bin/bash
[ -d mydir ]
cd mydir/ && pwd

View 4 Replies View Related

General :: If Statement With Multiple Tasks?

Feb 2, 2011

I want to have an if statement that does multiple things:


if [....] ; then


View 3 Replies View Related

Ubuntu Multimedia :: Mplayer Not Working - Fast Forward / Pause Dead

Jan 5, 2010

I am "fleshing out" my USB flash drive Netbook Remix of Ubuntu and have run into a snag on getting Mplayer Movie Encoder to work. Synaptics eventually showed 28 new packages will be installed which was done. But, the skin showing the "controls" (fast forward, pause etc) is dead. I am using the USB flash on a HP desktop and all other Remix features work well. Plus the Nvidea gui card fills my 19" flat screen exquisitely well. And, the stick works very nicely on my Acer Netbook (aspire one 250) too.

View 2 Replies View Related

Ubuntu Installation :: Can't Get Past Install Screen (Forward Button Not Working)

Oct 11, 2010

I'm installing Ubuntu 10.10 on my desktop and it seems I can't get past the "Who are you?" screen as I can't click the forward button

I've tried a number of times; installing from within live usb, without an Internet connection (Just to see if it helps) but all failed

EDIT: It was because my username had a capital letter in it.

View 9 Replies View Related

Debian :: Using Root Account With Or Without Slash?

Sep 26, 2015

I came to debian from fedora so there I used ( su - ) to become root user. So my question is that in debian, is it same using ( su ) and ( su - ) or here also using ( su - ) is preferred with slash or without slash. What is the correct and secure way in debian with full root status.

One more question relating gedit sources.list

I use as root account : gedit /etc/apt/sources.list (and then enter and sources file in gedit open)

Is this correct method or any other way as when save after changing entries inside it says error.

View 3 Replies View Related

General :: Printing Transcript With Ansi Escape Sequence?

Aug 8, 2010

Is there a way to print a transcript generated using script that is coloured using ansi escape sequences while preserving the colours?

I am on OS X 10.6, but any tool that works on OS X or on Linux that can print or create a pdf file will be extremely helpful.

View 1 Replies View Related

General :: Removing The Escape Characters From GNU Screen's Screenlog.%n?

Jan 22, 2010

Is it possible to remove the ESC sequences in GNU Screen's output file? Things such as colours, tabs and other escape characters make their way into the log files and become difficult to decipher.

I've tried Dr. Google & Co. as well as reading the manual, but haven't been able to find anything suitable.Perhaps I've overlooked something?

View 3 Replies View Related

General :: Escape From Evolution And Have Thunderbird Be My Default Email?

Feb 25, 2011

Fedora 14

When I started I took the defaults and ended up with Evolution.

I have never managed to get it set up to send. It and godaddy are on diffferent planets.

Having used Thunderbird in the past, I downloaded it and it automagically set itself up to send and receive.

So now I use Thunderbird - BUT - when I click on a link in an html page - the mailto macro sends me to something other than THunderbird - perhaps Evolution - and nothing gets sent.

So how do I tell the system that when i click a mailto in firefox I want Thunderbird?

PS I think I found it. In firefox - edit - preferences - applications tab - mmailto - it said Evolution. I changed it so say /usr/bin/thunderbird - will now test it.

YES - Seems that asking a question triggers my brain on how to resolve it. Sorry to waste your time.

View 1 Replies View Related

General :: Replace New Line With <br /> And Escape Special Characters?

Feb 6, 2011

I wish to replace a new line with br (html) but it doesn't seem to work


message=$(echo ${FORM_message} | tr '
' '<br />' )

what it gives me seems to be ... b...? I am also having problem escaping hash sign in cut command:


list=$(echo "$line" | cut -d'#;#' -f1) ;

my intention is to split the line with "#;#"

View 5 Replies View Related

General :: IF Statement - Not Getting Equal Results From All Cases

Jun 6, 2011

I'm a bit stuck with IF statement. There is the code:
# Variables
VAR2="echo $VAR1"

# Case 1
echo Case 1
if [ test == test ]; then
echo "equal"
echo "not equal"
echo ""

# Case 2
echo Case 2
if [ "VAR1" == test ]; then
echo "equal"
echo "not equal"
echo ""

# Case 3
echo Case 3
if [ "VAR2" == test ]; then
echo "equal"
echo "not equal"
echo ""

When executed, why case "2" and "3" differs from case "1"? Where am I wrong and how to solve this trouble? (my aim is to get "equal" from all cases).

View 2 Replies View Related

General :: Inverting A Bash Script Statement?

Jul 11, 2010

I want to have the System Bell ring when a process is over say a download. First I created a file named 'beep' that plays the System Bell. Because the System Bell rings by hitting cntrl-G the 'beep' file looks like this.


echo ^G

I then give the file owner execute permission. I know that this command would serve my purpose.



However I want to sharpen my Bash programming skills. I wanted to write the Bash script along the following logic and with the fewest lines possible. Not really a script, I want to insert this short script via command line instead of a file. Let's say the download has commenced and the PID = 16666.


until ps -p 16666

Now obviously 'ps -p 16666' will already evaluate to true. My question is, is there a way to maybe enclose 'ps -p 16666' and prepend some operator that inverts the condition to where until 'ps -p 16666' evaluates to false then run /root/beep?

View 5 Replies View Related

General :: Write A Bash Script Using An If...Then...Else Statement?

May 14, 2010

I need to to write a bash script using an If...Then...Else statement that will accept a day of the week from the command line what do I do or where do I go.

View 2 Replies View Related

General :: Can PATH Statement Be Used With Python In Ubuntu 9.10?

Oct 10, 2010

On Ubuntu 9.10 I installed Python 3.1.1 successfully with Synaptic Package Manager. However the Python interpreter cannot find my scripts, currently in /home/dave/pycode. This appends _temporarily_ but python remains clueless about location of my scripts. Searched Internet and some speak of .rc or .bashrc or .profile..files. Found some of these and opened with Komodo : they are Linux script files and I am clueless as to how to modify.Currently I can import my scripts only if I change to the /pycode dir before running.Lutz's Python book says to change PATH file - Ha .Sobell's "A practical Guide to Ubuntu Linux" is no help. Ubuntu's own on line help is worth less than a fart in a hurricane. Ubuntu's gedit would not even open bash.bashrc.

View 7 Replies View Related

General :: Case Statement In Shel Programing?

Mar 15, 2010

I am facing problem with the following script. Could you please look into this.echo 'Enter Staging number' case $STGNUM in

for i in {'stg1-greg','stg1-marsha','stg1-peter','stg1-jan','stg2-greg','stg2-marsha','stg2-peter','stg2-jan'};do echo $i; ssh $i sudo -u dev /opt/usr/apps/workflow/;done;


View 2 Replies View Related

Copyrights 2005-15, All rights reserved