Search Results

Search: Posts Made By: ctac_
1,828
Posted By ctac_
As you can see, you get cr lf so ...
As you can see, you get
cr lf
so
/Operator$/
never match
12,151
Posted By ctac_
You can try this way # Get parameters from...
You can try this way
# Get parameters from command line
while getopts "b:r:w:f" opt; do
case "$opt" in
b)
BankName=${OPTARG}
;;&
r)
Region=${OPTARG}
...
934
Posted By ctac_
You can try this sed too sed...
You can try this sed too
sed '/^$/!{h;s/.*[Ff][Rr][Oo][Mm] \([^ ;]*\).*/PROMPT \1/;G;}' infile
1,955
Posted By ctac_
You can try tr -s '"' infile
You can try
tr -s '"' infile
6,194
Posted By ctac_
If you don(t want the output of return.sh no...
If you don(t want the output of return.sh
no need of :
: [...]
The null command. Exit status is set to zero.
you can try this way
./return.sh >/dev/null;echo reply is $?
1,357
Posted By ctac_
You can use sed for this task. start='abc' ...
You can use sed for this task.
start='abc'
end='def'
search1='123'
search2='456'
sed '/^'"${start}"'/!d;:A;N;/\n'"${end}"'/!bA;/'"${search1}"'/bB;/'"${search2}"'/!d;:B' infile
1,537
Posted By ctac_
You can also try with sed. sed -n...
You can also try with sed.
sed -n '/<CompoundName>/!d;n;/InChI=/p' infile
1,763
Posted By ctac_
You can use this sed too sed -E ' :A N ...
You can use this sed too
sed -E '
:A
N
$!bA
s/(.*)(union all)(.*)/\1;\3/
' infile
1,893
Posted By ctac_
This way, you look for a number with 5 digits. ...
This way, you look for a number with 5 digits.
Starting with 2, the second digit can be 3, 4 or 5
the third digit can be 1, 0 or 3 and so on
You must use the | (or) to catch what you need.
sed -E...
1,893
Posted By ctac_
Yes we can. But give a representative input and...
Yes we can.
But give a representative input and expected output.
And give also what you have try to resolve your problem.
1,893
Posted By ctac_
The requirement change ?:confused: Just add "...
The requirement change ?:confused:
Just add " around 2[345]
1,893
Posted By ctac_
You can use sed too For the first requirement ...
You can use sed too
For the first requirement
sed -E 's/([^,]*)(,[^,]*,[^,]*,)(2[345],)(.*)/b\2\3\4/' infileIf a is always the first field
sed -E 's/a(,[^,]*,[^,]*,)(2[345],)(.*)/b\1\2\3/'...
2,100
Posted By ctac_
With sed sed -E...
With sed
sed -E '/Offer/{h;s/.*"(.*)">/\1/;x;};/Description/G;s/(.*>)(.*>)\n(.*)/\1\3_\2/' infile
1,660
Posted By ctac_
You can use sed too. If the data don't contain...
You can use sed too.
If the data don't contain _
sed 's/(/_/g;:A;s/\([^_]*\)\(.*\)_\([^_]*\)/\1(\3 \2/;tA;s/ / /g;s/ / /g;s/ $//' infile
1,589
Posted By ctac_
Hi, If i understand correctly ? This sed...
Hi,
If i understand correctly ?
This sed command write in a file all text under ..1618 and ..1618.
sed -E '/([^|]*\|){5}1618$/!d;:A;N;/\n([^|]*\|){4}1618$/!bA;w savefile' infile
7,159
Posted By ctac_
Many tanks. I don't know this type of back...
Many tanks.
I don't know this type of back reference too
s/"*\([^|"]*\)"*/X\1X/3
^
7,159
Posted By ctac_
Hi, Thanks to reply but sorry, my question was...
Hi,
Thanks to reply but sorry, my question was too short.
So, I try to explain my non-understanding.

If infile contain a line like that
abc|123"|gh-ch"|23.067"with this command line
sed...
3,109
Posted By ctac_
You can try this one too sed -n...
You can try this one too
sed -n '/START/{N;/LINUX/{:A;N;/END/!bA;p;q}}' infile
7,159
Posted By ctac_
Hi, I think this one with sed is ok. sed...
Hi,
I think this one with sed is ok.
sed 's/^/"/;s/\([^|]\)\([|]\)\([^|]\)/\1"\2"\3/g;s/$/"/;s/""/"/g' infileI don't understand this one from Scrutinizer in #3
sed 's/"*\([^|"]*\)"*/"\1"/g'...
21,705
Posted By ctac_
Hi How about while read line;do echo...
Hi
How about
while read line;do echo ${line%_*};done<lefile
5,551
Posted By ctac_
Hi, try RS="[^\"Mr.\"][.?!]"
Hi, try
RS="[^\"Mr.\"][.?!]"
3,873
Posted By ctac_
Hi With awk awk 'BEGIN{FS="[><]";RS="<Country...
Hi
With awk
awk 'BEGIN{FS="[><]";RS="<Country code="}/^$/{next};{gsub("\"","",$1);print "Country - "$1"\n"$1" "$4"\n"$1" "$8 }' inputfile
1,977
Posted By ctac_
Hi, Your awk script is'nt ok here. I must...
Hi,
Your awk script is'nt ok here.
I must change the first line.

/^#[0-9][0-9]*$/ {
uname -a
Linux debian-linux 4.11.0-1-amd64 #1 SMP Debian 4.11.6-1 (2017-06-19) x86_64 GNU/Linux
awk -Wv...
Showing results 1 to 23 of 23

 
All times are GMT -4. The time now is 09:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy