10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a shell script that looks something like the following:
mysql -uroot db1 < db1.sql
mysql -uroot db2 < db2.sql
mysql -uroot db3 < db3.sql
mysql -uroot db4 < db4.sql
....
different db names in more than 160 lines.
I want to run this script with nohup and have a status later.
So,... (6 Replies)
Discussion started by: MKH
6 Replies
2. Shell Programming and Scripting
Hi everyone,
currently I writing a script for comparing 2 variable in 2 line then output the line with equal value to new file. However, the new file only contain last line only, the earlier line was delete. I do google my problem but still not find the way out. Sorry for my English.
Thank you... (10 Replies)
Discussion started by: lazy_bear
10 Replies
3. Shell Programming and Scripting
Hi again. Sorry for all the questions — I've tried to do all this myself but I'm just not good enough yet, and the help I've received so far from bartus11 has been absolutely invaluable. Hopefully this will be the last bit of file manipulation I need to do.
I have a file which is formatted as... (4 Replies)
Discussion started by: crunchgargoyle
4 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I would like to add a new column containing the row numbers to a text file. How do I go about doing that? Thanks!
Example input:
A X
B Y
C D
Output:
A X 1
B Y 2
C D 3 (5 Replies)
Discussion started by: evelibertine
5 Replies
5. Shell Programming and Scripting
Hello Everyone,
I need a help from experts of this community regarding one of the issue that I am facing with shell scripting.
My requirement is to append char's at the end of each line of a file. The char that will be appended is variable and will be passed through command line.
The... (20 Replies)
Discussion started by: Sourav Das
20 Replies
6. Shell Programming and Scripting
Hi All,
I have a file which has some Linux commands in every line like
more 456.dat
more 3232.dat
more 433.dat
I want to add texts like this at the end of every line:
more 456.dat > 1.txt
more 3232.dat > 2.txt
more 433.dat > 3.txt
So, that the result of more goes into 1.txt... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies
7. Shell Programming and Scripting
Hi! I'm trying to assign line numbers to each line of the file
for example consider the following..
The contents of the input file are
hello how are you?
I'm fine.
How about you?
I'm trying to get the following output..
1 hello how are you?
2 I'm fine.
3 How about you? ... (8 Replies)
Discussion started by: abk07
8 Replies
8. Shell Programming and Scripting
i am writing a script which will let user to input a line.
i m not sure how do i add this line to the end of a txt file ? (8 Replies)
Discussion started by: 76455
8 Replies
9. Shell Programming and Scripting
Hi guys,
How to add a line before a specific line (identified with the starting work ex: xxx) of a file and write it back to the same file?
Thanks (12 Replies)
Discussion started by: mwrg
12 Replies
10. Shell Programming and Scripting
I want to add a line at the beginning and at the end of a file..
e.g.
echo "at the beginning.." > tmp_file &&
cat file >> tmp_file &&
echo "last line" >> tmp_file &&
mv tmp_file file
is there a nice way for doing that??
Thx (2 Replies)
Discussion started by: andy2000
2 Replies