10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi gurus,
I need add one new line in the begining of current file.
current file
abc
cde
add
xyz
output file
newline
abc
cde
add
xyz (6 Replies)
Discussion started by: ken6503
6 Replies
2. Shell Programming and Scripting
Hi,
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
6 Replies
3. Shell Programming and Scripting
Hi,
I have multiple files having many lines like as bvelow:
file Name a.txt
abc def
def xyz
123 5678
file Name b.txt
abc def
def xyz
123 5678
I would like to append files in the below format to a new file:
file Name c.txt (7 Replies)
Discussion started by: rramkrishnas
7 Replies
4. UNIX for Dummies Questions & Answers
how to add value/word at the beginning of each line in a file ?
i have file number.txt and the output is below
1000
1001
1002
1003
1004
i want to add 000 at the beginning of each line, desire output is below
0001000
0001001
0001002
0001003
0001004
and so on
please advise how... (5 Replies)
Discussion started by: jason6247
5 Replies
5. Shell Programming and Scripting
I want to append file names at the beginning of a line for each row
file content
abc.txt.gz 123|654|987
bcd.txt.gz 876|trf|kjh
I want a single output file with below format
abc.txt.gz|123|654|987
bcd.txt.gz|876|trf|kjh
This one is working but only with unzip files,need to have... (3 Replies)
Discussion started by: rakesh5300
3 Replies
6. Shell Programming and Scripting
Hi
I've been trying to search but couldn't quite get the answer I was looking for.
I have a a file that's like this
Time, 9/1/12
0:00, 1033
0:10, 1044
...
23:50, 1050
How do I make it so the file will be like this?
9/1/12, 0:00, 1033
9/1/12, 0:10, 1044
...
9/1/12, 23:50, 1050
I... (4 Replies)
Discussion started by: diesel88
4 Replies
7. Shell Programming and Scripting
I am writing a code to append some numbers in the beginning of each line in all the files present in a directory. The number of files are really huge. The files are numbered as 1.sco, 2.sco, 4.sco (Note: 3.sco is missing).
The files currently look like this:
1.sco
2 3
5 6
6 7My task is to... (4 Replies)
Discussion started by: shoaibjameel123
4 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. UNIX for Dummies Questions & Answers
I was trying to find out the easiest way to write new line to the beginning of an exisiting file.
I am using KSH. (5 Replies)
Discussion started by: sailussr
5 Replies
10. 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.
string1="abcd"
string2="efgh"
i want $string1 content $string2 for each line.
Is that possible? (3 Replies)
Discussion started by: Linux-fueled
3 Replies