10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i am having file like this
#!/bin/bash
read -p 'Username: ' uservar
match='<color="red" />'
text='this is only a test
so please be patient
<color="red" />'
echo "$text" | sed "s/$match/&$uservar\g"
so desireble output what i want is if user type MARIA
this is only a test
so please... (13 Replies)
Discussion started by: tomislav91
13 Replies
2. Shell Programming and Scripting
Dear All
I am having a text file which is having more than 200 lines.
EX:
001010122 12000 BIB 12000 11200 1200003
001010122 2000 AND 12000 11200 1200003
001010122 12000 KVB 12000 11200 1200003
In the above file i want to search for string KVB... (5 Replies)
Discussion started by: suryanarayana
5 Replies
3. Shell Programming and Scripting
Hi,
I am trying to remove lines once a string is found till another string is found including the start string and end string. I want to basically grab all the lines starting with color (closing bracket). PS: The line after the closing bracket for color could be anything (currently 'more').... (1 Reply)
Discussion started by: Dabheeruz
1 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
can some one help me out
file 1 i have
06/01 3:14 d378299
06/01 8:10 d642036
06/01 10:51 d600441
06/01 10:52 d600441
06/01 11:11 d607339
06/01 11:49 d398706
something like this and in file named list i have ( there is space btwn 06/01 and 11:49 and d398706)
d607339... (5 Replies)
Discussion started by: zozoo
5 Replies
5. UNIX for Dummies Questions & Answers
Hello All,
i am a newbie and need some help when reading a csv file in a bourne shell script. I want to read 10 lines, then wait for a minute and then do a reading of another 10 lines and so on in the same way. I want to do this till the end of file.
Any inputs are appreciated
... (3 Replies)
Discussion started by: victor.s
3 Replies
6. Shell Programming and Scripting
How can I do this? Actually I have a file which contains a path
e.g.
/home/john/Music/hello.mp3
and I want to take only the filename (hello.mp3) So, I need to read the file from its end to its start till the character "/"
Is this possible?
Thanks, I am sure you'll not disappoint me here!
Oh,... (9 Replies)
Discussion started by: hakermania
9 Replies
7. Shell Programming and Scripting
Hi ,
I have below file with 13 columns. I need 2-13 columns seperated by comma and I want to append each row with a string "INSERT INTO xxx" in the begining as 1st column and then a variable "$node" and then $2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13 and at the end another string " ; COMMIT;"
... (4 Replies)
Discussion started by: Vaddadi
4 Replies
8. 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
9. UNIX for Dummies Questions & Answers
Hello all
How can I insert character to the end of text file without opening it in vi
Just simple one liner, can it be done?
Tnx (1 Reply)
Discussion started by: umen
1 Replies
10. UNIX for Advanced & Expert Users
Hi All,
I like to read the log file from specific time to end of the file.
eg:
message
date and time
message 1
date and time1
message 2
EOF
I want to read all the text (Messages) after date and time to end of the file.
Please let me know the UNIX command to perform this?.
Thanks,... (9 Replies)
Discussion started by: bsrajirs
9 Replies