When running this i am getting solaris Label too long :L; $ {s/\n//g ....
Kindly, please help me to resove this issue. I am a new bee to this
sed ':L; $ {s/\n//g;
s/<\/test1>/\n/g
s/<test>\|<tag.>.*<\/tag.>//g
s/\n$//}
N; bL
Related
i am currently building openfoam 1912 from source and have some trouble building paraview. I just build Qt and Cmake but as soon as i type ./makeParaview qt-5.9.9 5.6.3i get the following error:
./makeParaView: 64: local: -DWM_DP: bad variable name
./makeParaView: 64: ./makeParaView: -DOPENFOAM: bad variable name
A similar error occurs when i try to make VTK / Adios2. Any idea where i took the wrong turn?
Greetings
Gabbagandalf
The proper solution is related to shell quoting issues
- flag="$(stripCompilerFlags $flag)"
+ flag="$(stripCompilerFlags "$flag")"
but in the meantime you can simply change the shebang to #!/bin/bash - it is more forgiving.
As discussed and resolved in these GitLab ticket-1 and ticket-2:
The issue seems to be Ubuntu related.
Solution:
Prior to execute ./makeParaview, switch to bash:
Change the first line of makeParaView script to #!/bin/bash
sudo dpkg-reconfigure dash
./makeParaView
I was trying to make a baseline MT system. Just for checking How it works I made Source (S) and Target (T) language corpus of just 2000 sentences. The very first step is to prepare the data for Machine Translation (MT) system. In this step first we have to perform tokenization as mentioned here Baseline SMT. I've used this code:
~/mosesdecoder/scripts/tokenizer/tokenizer.perl -l en \
< ~/corpus/training/news-commentary-v8.fr-en.en \
> ~/corpus/news-commentary-v8.fr-en.tok.en
~/mosesdecoder/scripts/tokenizer/tokenizer.perl -l fr \
< ~/corpus/training/news-commentary-v8.fr-en.fr \
> ~/corpus/news-commentary-v8.fr-en.tok.fr
( say S = French & T = English)
I checked after 2 hours it was still running. I got curious since it was not expected. Then I tried with just ten sentences. To my surprise, it's been 30 minutes and it is still running.
Did I do anything wrong?
PS: OS = Ubuntu 14.04.5 LTS
Sony ultrabook
No dual boot.
Please Follow bellow steps ;
git clone https://github.com/moses-smt/mosesdecoder.git
cd mosesdecoder
git clone https://github.com/moses-smt/giza-pp.git
cd giza-pp
make
mkdir tools
cp giza-pp/GIZA++-v2/GIZA++ giza-pp/GIZA++-v2/snt2cooc.out giza-pp/mkcls-v2/mkcls tools
scripts/tokenizer/tokenizer.perl -l fr < ~/corpus/training/news-commentary-v8.fr-en.fr > ~/corpus/news-commentary-v8.fr-en.tok.fr
I have a xmltv file that has the following style lines for program start/stop times
<programme start="20150914003000" stop="20150914020000" channel="Noor TV">
I want to add +0000 to the end of the start/stop time like the following
<programme start="20150914003000 +0000" stop="20150914020000 +0000" channel="Noor TV">
I am using windows sed and got this far
sed -r "/<programme start=\"/ s/^([0-9]{14})/\1 +0000/g" < "xml.xml" > "xml2.xml"
its giving me sed cant read >: invalid argument
in the dos windows I can see its adding the +0000 but not writing the new file
I know its something dumb but I just cant figure it out.
thks.
Try this
sed -r "/<programme start=/ s/^([0-9]{14})/\1 +0000/g" "xml.xml" > "xml2.xml"
or (posix version)
sed "/<programme start=/ s/^([0-9]\{14\})/\1 +0000/g" "xml.xml" > "xml2.xml"
$cat xml.xml
<programme start="20150914003000" stop="20150914020000" channel="Noor TV">
$sed -r 's/start="([0-9]{14})" stop="([0-9]{14})"/start="\1 +0000" stop="\2 +0000"/' xml.xml >xml2.xml
$cat xml2.xml
<programme start="20150914003000 +0000" stop="20150914020000 +0000" channel="Noor TV">
had tried it by online linux
The first < needs a backslash, not a forward slash.
sed -r "\<programme start=\"/ s/^([0-9]{14})/\1 +0000/g" < "xml.xml" > "xml2.xml"
I am facing difficulties to run below query. Can some one help me to what is the issue on it ?
def test():
cmd="python /home/shanaka/volapp/volatility-2.3.1/vol.py -f /home/shanaka/memory_sample/ubuntu-12.04-amd64-jynxkit.mem ---profile={0} {1}".format(OSselection.get(),option.get())
f1 = os.popen3(cmd)
for lt in f1.readlines():
print(lt)
This is not printing, Option.get is taking as another command, an error as below:
Volatility Foundation Volatility Framework 2.3.1
ERROR : main : You must specify something to do (try -h)
/bin/sh: 2: linux_banner: not found
Please help me to resolve this.
f1 = os.popen("python /home/shanaka/volapp/volatility-2.3.1/vol.py -f /home/shanaka/memory_sample/ubuntu-12.04-amd64-jynxkit.mem --profile="+OSselection.get().rstrip()+" "+ option.get().rstrip())
argument taking as new line, so i have remove the new line.
The idea is to apply both these substitutions to the pattern space
sed -re 's/\v\s+/\t/g' -re 's/[(]([^()]+)[)]\s*\t/\1\t/' movies.list
gives me what I think is a syntax error.
Here is some test data (although it won't match the first pattern.
& The Oriental Groove, Yacine "Els matins a TV3" (2004)
& Vinícius, João Bosco Show da Virada (2011) Teleton 2009 (2009) Teleton 2012 (2012) "Eliana" (2009)
'77 Big Smoker Pig "Pop ràpid" (2011)
'Ariffin, Syaiful Desire (2014/III)
'Aruhane Shaping Bamboo (1979)
'Atu'ake, Taipaleti When the Man Went South (2014)
Just use a ; between your substitution commands:
sed -re 's/\v\s+/\t/g; s/[(]([^()]+)\s*\t/\1\t/' movies.list
The second -r flag is causing the problem. At that point in the argument processing you can't be using that flag apparently. Just drop it.
sed -re 's/\v\s+/\t/g' -e 's/[(]([^()]+)[)]\s*\t/\1\t/' movies.list