10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
For a given string that may contain any ASCII chars, i.e. that matches .*,
find and print only the chars that are in a given subset.
The string could also have numbers, uppercase, special chars such as ~!@#$%^&*(){}\", whatever a user could type in
without going esoteric
For simplicity take... (1 Reply)
Discussion started by: naderra
1 Replies
2. Shell Programming and Scripting
I have a workaround to the problem i m posting, however if someone wants to look at my query and respond ... i will appreciate.
This is in reference to this thread -> https://www.unix.com/shell-programming-and-scripting/267630-extract-between-two-exact-matched-strings.html
I have data.txt as... (11 Replies)
Discussion started by: mohtashims
11 Replies
3. Shell Programming and Scripting
friends I am struck in a situation where I need to comment a line start with space as below in a file
root@LOCALHOST * rw
LOCALHOST* r
I should comment second line only
Any help please (16 Replies)
Discussion started by: mallak
16 Replies
4. Shell Programming and Scripting
Hi All,
I am trying to replace the variable in the file after the particular match string. It is being replaced if i hardcode the value and with use of "&" with sed.
sed -e "s/URL./& http:\\localhost:7223/g"
But when am trying to pass the variable it is failing. I tried multiple... (9 Replies)
Discussion started by: sharsour
9 Replies
5. Shell Programming and Scripting
Hi all,
Here is the data file:
- want to match only lan3 in the output .
- not lan3:1
file :
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1
INTERFACE_NAME="lan3"
IP_ADDRESS="10.53.52.241"
SUBNET_MASK="255.255.255.192"
BROADCAST_ADDRESS=""
INTERFACE_STATE=""... (2 Replies)
Discussion started by: rveri
2 Replies
6. UNIX for Dummies Questions & Answers
Hi !
With awk, I would need to trim a string from the beginning up to the first occurrence of "1", then from the beginning up to the second occurrence of "1", then from the beginning up to the third, then the fourth...., then the last occurrence of "1".
input:
1aaa1bb1ccccccc
dd1e1ffff... (7 Replies)
Discussion started by: beca123456
7 Replies
7. Shell Programming and Scripting
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies
8. Shell Programming and Scripting
Hi There!
I'm stuck with a problem trying to output some sections of a rss feed to my conky program using curl and sed.
The rss feed is for tide times and I wish to output the times but not the rest to the conky desktop. To do this I need to pull out the four instances of times that are in... (4 Replies)
Discussion started by: huffpuff
4 Replies
9. Shell Programming and Scripting
Hi,
Im an awk noob and I am having trouble trying to get matches.
Here is my script:
#!/bin/gawk -f
BEGIN {}
$0 ~ /<a href=".*">.*<\/a>/{print}
Ideally I want to be able to get the actual link and print it. In PHP you can do preg_replace and get the match you want by using \\1 where 1... (2 Replies)
Discussion started by: adsyuk
2 Replies
10. Shell Programming and Scripting
Dear Friends,
Anybody knows how to match exact lines only in multilinear.
Input file:
apple
orange
orange
apple
apple
orange
Desired output:
fruit
orange
apple
fruit
i used the command (1 Reply)
Discussion started by: vasanth.vadalur
1 Replies