10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am facing a problem as under, Suppose I have a file (test.txt) with the below content (all braces and slashes are included in the contents of the file)
Now I want to append few words below matched line, I have written the below sed:
sed '/option/a insert text here' test... (2 Replies)
Discussion started by: ankur328
2. Shell Programming and Scripting
I have a large text file with multiple similar patterns on each line like:
blank">PATTERN1 some word PATTERN2
title=">PATTERN1 some word PATTERN2
blank">PATTERN1 another word PATTERN2
title=">PATTERN1 another word PATTERN2
blank">PATTERN1 one more time PATTERN2
title=">PATTERN1... (10 Replies)
Discussion started by: martinsmith
3. Shell Programming and Scripting
I'm having an issue trying to produce a hierarchical directory menu that has either any directories listed in a specific directory as options or options with spaces in the option content or null content.
So the menu function gets passed a base directory, it then lists any .sh scripts in... (6 Replies)
Discussion started by: andyatit
4. Shell Programming and Scripting
How do you grep only an exact string. I am using Solaris10 and do not have any GNU products installed.
Contents of car.txt
CURRENT COMMAND LINE: WHERE VARIABLE CAR_NUMBER=1 AND KEY_NUMBER=1
grep... (1 Reply)
Discussion started by: thibodc
5. Shell Programming and Scripting
I want to select contents between two numbers say 1. and 2. from an output file which has many numbers but only the these two ending with a dot(.) eg 1. 2 . 32. etc I was looking to select with the use of a counter then modify the selected contents and put it in an output file where again the... (3 Replies)
Discussion started by: ausfragen
6. Shell Programming and Scripting
Thanks for looking at this issue.
I have many words/lines in a files like below
custored apple apple
if i want to replace only/exact apple occurrences with XXX i could use below,
sed 's/\<apple\>/XXX/g' filename
this is working in Linux, but now in my free BSD... (3 Replies)
Discussion started by: ramanaraoeee
7. UNIX for Dummies Questions & Answers
i'm trying to get grep to do an exact match for the following pattern but..it's not quite working. I'm not too sure where did I get it wrong. any input is appreciated.
echo "$VAR" | grep -q '^test:]name'
if ; then
printf "test name is not found \n"
on... (4 Replies)
Discussion started by: jazzaddict
8. Shell Programming and Scripting
I am facing difficulties in selecting the contents between two delimiters when there is a new line occurs..
abcd -- this is the first line %
efgh-- this is the
second line and not
able to print %
ijkl -- this is the 3rd line %
when i search for abcd and... (8 Replies)
Discussion started by: Balaji PK
9. Shell Programming and Scripting
I have a file1 that looks like
and file 2 that looks like
60127329389... (2 Replies)
Discussion started by: aismann
10. UNIX for Dummies Questions & Answers
I am looking for a simple command to select text within a open bracket "("
and a matching close bracket ")" and output the within-bracket-text to a file.
This function is similar to the common vi select a range of text with "(" to ")"
but not sure how to run the same function in command... (4 Replies)
Discussion started by: cursive