9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a specific requirement to add text at the beginning and end of a plain text file. I tried to use "sed" with '1i' and '$a' flags but these required two separate "sed" commands separated with "|".
I am looking for some command/option to join these two in single command parameter.
... (6 Replies)
Discussion started by: bhupinder08
2. UNIX for Dummies Questions & Answers
Need some help with sed.
I have a file that has sections :
There's many sections in the file. (1 Reply)
Discussion started by: andyatit
3. Shell Programming and Scripting
I want to know how I can copy line 6th to 10th and paste it after 17th line in same file.
Biplab (19 Replies)
Discussion started by: Biplab
4. Shell Programming and Scripting
Well here goes:
I tried to write a batch file that adds a specific fixed text to each line of an already existing text file.
for the adding text infront of each line I tried this:
for /F "delims=" %%j in (list.txt) do echo.STARTTEXT\%%j >> list.txt
for adding text after each line I... (0 Replies)
Discussion started by: pasc
5. UNIX for Dummies Questions & Answers
How can I specify special meaning characters like ^ or $ inside a regex range. e.g
Suppose I want to search for a string that either starts with '|' character or begins with start-of-line character.
I tried the following but it does not work:
sed 's/\(\)/<do something here>/g' file1
... (3 Replies)
Discussion started by: jawsnnn
6. UNIX for Dummies Questions & Answers
exmaple, i need to replace the number "5" from all lines below with "X"?
What is the useful vim command that i can apply for..
ddsadsgag506pghssuyk (1 Reply)
Discussion started by: 793589
7. Shell Programming and Scripting
Hi, excuse me for my poor english.
My problem is that:
I have a File
i want to add to each line of that file two strings: one at the beginning of the line, one at the ending.
i want $string1 content $string2 for each line.
Is that possible? (3 Replies)
Discussion started by: Linux-fueled
8. Shell Programming and Scripting
I want to grep for a line and copy and paste that line.
---- file abc.txt ----
host=atlx1 sid=atld1 firstname.lastname@example.org
host=atlx2 sid=atld2 email@example.com
host=atlx3 sid=atld3 firstname.lastname@example.org
host=atlx4 sid=atld4 email@example.com
--- end of file abc.txt ----
Now I... (16 Replies)
Discussion started by: upsrk
9. Shell Programming and Scripting
I am having some trouble cut and paste a file based on the content of another file.
I have a file called draft. I need to cut and paste its content to another file based on the content of a file called proc.txt
The content of proc.txt is like the following:... (7 Replies)
Discussion started by: tiger99