10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I wish to search and delete all lines in /app/Jenkins/deploy.txt having this filename string /app/Jenkins/file2.mrt as entry:
I'm using : colon as delimiter in sed command as I'm dealing with file paths.
Below is the command I was expecting to work.
sed -i ":/app/Jenkins/file2.mrt:d"... (1 Reply)
Discussion started by: mohtashims
1 Replies
2. Shell Programming and Scripting
i am having file like this
#!/bin/bash
read -p 'Username: ' uservar
match='<color="red" />'
text='this is only a test
so please be patient
<color="red" />'
echo "$text" | sed "s/$match/&$uservar\g"
so desireble output what i want is if user type MARIA
this is only a test
so please... (13 Replies)
Discussion started by: tomislav91
13 Replies
3. Shell Programming and Scripting
Hi,
I did some research but cannot find the right solution so hopefully someone can help me here.
I have a long string format like:
VAR=111:aaaa,222:bbb,333:ccc
it could be
VAR=111:aaa,222:bbb,333:ccc,444:ddd, etc
what I looking for is eg.
if I give ccc, it will return me 333... (2 Replies)
Discussion started by: netbanker
2 Replies
4. Shell Programming and Scripting
Hello all,
I have file like this:
file 1:
aa
bb
cc
dd
ee
file2:
111
111
111
111
111
111 (2 Replies)
Discussion started by: attila
2 Replies
5. Shell Programming and Scripting
Hi,
1_strings file contains
$ cat 1_strings
/home/$USER/Src
/home/Valid
/home/Review$ cat myxml
<projected value="some string" path="/home/$USER/Src">
<input 1/>
<estimate value/>
<somestring/>
</projected>
<few more lines >
<projected value="some string" path="/home/$USER/check">... (4 Replies)
Discussion started by: greet_sed
4 Replies
6. Shell Programming and Scripting
i have a file1 with many lines. i have a script that will let me input a string. for example, APPLE. what i need to do is to copy all lines from file1 where i can find APPLE or any string that i specify and paste in on file 2
thanks in advance! (4 Replies)
Discussion started by: engr.jay
4 Replies
7. Shell Programming and Scripting
Hi,
file -> temp.txt
cat temp.txt
/home/pradeep/123/a_asp.html
/home/pradeep/123/a_asp1.html
/home/pradeep/435/a_asp2.html
/home/pradeep/arun/abc/a_dfr.html
/home/pradeep/arun/123/a_kir.html
/home/pradeep/123/arun/a_dir.html
....
....
..
i need to get a_*.html(bolded strings... (4 Replies)
Discussion started by: pradebban
4 Replies
8. Shell Programming and Scripting
I have a list of postal addresses and I need to pull the records that match a list of zip codes in a separate file. The postal addresses are fixed width. The zip code is located in character position 149-157.
Something better than: cat postalfile.txt | grep -f zipcodes.txt
would be great.
$... (8 Replies)
Discussion started by: sitney
8 Replies
9. Shell Programming and Scripting
I would like to find a list of files in a directory less than 2 days old and put them into an array variable. And then search for each file in the array for a matching string say "Return-code= 0". If it matches, then display the array element with a message as "OK".
Your help will be greatly... (1 Reply)
Discussion started by: mkbaral
1 Replies
10. Shell Programming and Scripting
Hi guys, I hope you can help me with my problem.
I have a text file that contains lines like this:
78 ANGELO -809.05
79 ANGELO2 -5,000.06
I need to find all occurences of amounts that are negative and replace them with x's
78 ANGELO xxxxxxx
79... (4 Replies)
Discussion started by: amangeles
4 Replies