10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to delete all matches in a text following this pattern:
Each match starts with linux-
Each match ends with a space
(Remove linux-* until immediate next space)
EXAMPLE:
From this text:
ibudev1 libudev1 libweather-ion7 libxatracker2 linux-generic linux-headers-generic... (4 Replies)
Discussion started by: Tribe
4 Replies
2. Shell Programming and Scripting
I have a file comp.pkglist which mention package version and release . In 'version change' and 'release change' line there are two versions 'old' and 'new' Version Change: --> Release Change: -->
cat comp.pkglist
Package list: nss-util-devel-3.28.4-1.el6_9.x86_64
Version Change: 3.28.4 -->... (1 Reply)
Discussion started by: Paras Pandey
1 Replies
3. Shell Programming and Scripting
Hi all,
I have this input:
"203324780",,"89321213261247090146","VfdsD150","0D","fd3221","V0343","aaa","Direkt","fsa","2015.02.27","39833,54454,21214",,,"fd","NORMAL","D","10fd","1243 Flotta","HiĂĄnytalan","2013.02.25",,"2013.02.25","2013.02.24","2013.02.28",,"SajĂĄt... (4 Replies)
Discussion started by: snayper
4 Replies
4. Shell Programming and Scripting
Dear All,
Can anyone help to remove the , bewteen "" in a string by using sed or awk?
e.g.
input : 1,4,5,"abcdef","we,are,here",4,"help hep"
output:1,4,5,"abcdef","wearehere",4,"help hep"
Thanks,
Mimi (5 Replies)
Discussion started by: mimilaw
5 Replies
5. Shell Programming and Scripting
Hello All,
I am running a command find . -name amp.cfg | cut -c 3- which gives me output something like below
rel/prod/amp.cfg
rel/fld/amp.cfg
deb/detail/amp.cfg
deb/err/amp.cfg I want to remove trailing "/amp.cfg" so that i should get output something like... (7 Replies)
Discussion started by: anand.shah
7 Replies
6. Shell Programming and Scripting
Hello!
Please bare with me, I'm a total newbie to scripting. Here's the sudo code of what I'm trying to do:
Get file name
Does file exist?
If true
get length of file name
get network id (this will be the last 3 numbers of the file name)
loop x 2
If... (1 Reply)
Discussion started by: KatieV
1 Replies
7. Shell Programming and Scripting
Hi guys,
I have been trying to play with sed to accomplish this but I just can't quite get it right.
I need to be able to remove the year from a string held in a variable in my bash script.
The string may have multiple words but always ends with a year such as (2009)
for example:
... (2 Replies)
Discussion started by: tret
2 Replies
8. Shell Programming and Scripting
seems easy but havent found in other posts...
i want to delete any spaces if found before first occurence of ${AI_RUN}
sed 's/ *\\$\\{AI_RUN\\}/\\$\\{AI_RUN\\}/' $HOME/temp1.dat
i think i'm close but can't put my finger on it. :rolleyes: (6 Replies)
Discussion started by: danmauer
6 Replies
9. Shell Programming and Scripting
Hi,
My knowledge about sed is limited but I have a problem that I think can be solved with sed.
I have a variable in a shell script that stores a lot of path/filenames and the delimitter between them is a space (they all exist on the same line). One part of the filename is the file creation... (4 Replies)
Discussion started by: pcrs
4 Replies
10. Shell Programming and Scripting
Hello,
I have the following to remove spaces from beginning and end of a string.
infile=`echo "$infilename" | sed 's/^ *//;s/ *$//`
How do I modify the above code to remove spaces from beginning, end and in the middle of the string also.
ex:
... (4 Replies)
Discussion started by: radhika
4 Replies