10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have an array in an external file, "array.txt", which contains:
char *testarray={"Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"};I want to be able to add an element to this array, and have that element display, whenever I call it, without having to recompile... (29 Replies)
Discussion started by: ignatius
29 Replies
2. Shell Programming and Scripting
Hi all and apologies for the silly question, but I've searched and I can't get this right.
I have a list of email addresses in a file that I need to blacklist (spam). the list is quite long and I would need to script a small routine so that I can get the following for each line in the file:
db... (4 Replies)
Discussion started by: bm555
4 Replies
3. Shell Programming and Scripting
Hi,
I am doing something like below:
cat file1>file3and
cat file2>>file3
I wanted to check if there is a way to write a custom message(hardcoded message)something like below at the beginning of each line then PIPE delimitiation and then followed by remaining record.
cat file1... (7 Replies)
Discussion started by: Saanvi1
7 Replies
4. Shell Programming and Scripting
Hi All
I have a folder that contains hundreds of file with a names
3.msa
4.msa
21.msa
6.msa
345.msa
456.msa
98.msa
...
...
...
I need rename each of this file by adding "core_" in the begiining of each file such as
core_3.msa
core_4.msa
core_21.msa (4 Replies)
Discussion started by: Lucky Ali
4 Replies
5. Linux
How would I do that?
/Rutger (6 Replies)
Discussion started by: rutgerblom
6 Replies
6. Shell Programming and Scripting
I need some help with adding lines to file and substitute a pattern.
Ok I have a file:
#cat names.txt
name: John Doe
stationed: 1
name: Michael Sweets
stationed: 41
.
.
.
And would like to change it to:
name: John Doe
employed
permanently
stationed: 1-office (7 Replies)
Discussion started by: hemo21
7 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I am using ">>" to append to the existing file but I appens to the end of the file but I want to add tne new things at the beginning. Do we have any functionality to do that?
Thanks,
Siba (1 Reply)
Discussion started by: siba.s.nayak
1 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have file a.txt as below. I want to add one string root beginning of each line.
Sample file a.txt
aaa
bbb
ccc
Sample output
Root aaa
Root bbb
Root ccc
Can any one help me on this? (6 Replies)
Discussion started by: siba.s.nayak
6 Replies
9. Shell Programming and Scripting
I have a file that contains a great number of lines, let's say 183 lines, and I want to add: echo " to the beginning of each line. What is the easiest way to do it?
Tx (9 Replies)
Discussion started by: Ernst
9 Replies
10. Shell Programming and Scripting
How can i add a character(#) in the beginning of every line in a .dat file (2 Replies)
Discussion started by: Cool Coder
2 Replies