10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I have a working script.
It does what I am intending it to but a bit confused whether the sed part is supposed to be working or not. Further down is the script with the sed part that should have been working but not and the grep -v part which is the workaround that I am using at the... (10 Replies)
Discussion started by: newbie_01
10 Replies
2. UNIX for Beginners Questions & Answers
Looking for help,
i have input file like below and want to modify to expected output, if can without create additional file, hope can direct modify it.
have 2 thing need do.
1st
is adding a word (testplan generation off) after ! ! IPG: Tue Aug 07 14:31:17 2018
2nd
is adding... (16 Replies)
Discussion started by: kttan
16 Replies
3. Shell Programming and Scripting
How to pre-append a variable string to each line in a file contains both single and double quotes?
The variable string has no quotes in it.
thank you very much.
:confused: (8 Replies)
Discussion started by: dtdt
8 Replies
4. Shell Programming and Scripting
Hi,
I want to achieve something similar to what described in another post:
The difference is I want to add the line if the pattern is not found.
File 1:
A123, valueA, valueB
B234, valueA, valueB
C345, valueA, valueB
D456, valueA, valueB
E567, valueA, valueB
F678, valueA, valueB
... (11 Replies)
Discussion started by: jyu3
11 Replies
5. 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
6. Shell Programming and Scripting
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 and add/replace... (1 Reply)
Discussion started by: suryanarayana
1 Replies
7. UNIX for Dummies Questions & Answers
I searched and found "echo -n" and "printf" are solution for this, but they are not
here:
$ echo "hello" >> test
$ cat test
hello
$ echo -n "world" >> test
$ cat test
hello
world
$ echo -n " seriously?" >> test
$ cat test
hello
world seriously?
This is not successful... (15 Replies)
Discussion started by: stunn3r
15 Replies
8. Shell Programming and Scripting
I have file A.txt
A 1023
B 123
C 1223
I want output
Hello_12PM_A 1023
Hello_12PM_B 123
Helll_12PM_C 1223
Add Hello and time stamp in AM and PM. (4 Replies)
Discussion started by: asavaliya
4 Replies
9. Shell Programming and Scripting
HI Guys,
I am new user its my first post.
I have one file in DIR XYZ.
File name is ABCDEF.log
Now i want to add that file in each line of file.
I have data in file ABCDEF.log
TestKLFH
TEstLKHU
HESTLJHG
Now i want to update the file with below data
ABCDEFG.log:TestKLFH... (5 Replies)
Discussion started by: asavaliya
5 Replies
10. UNIX for Advanced & Expert Users
Id like to delete a line from a file using (preferably a single line unix command) if it contains a certain string pattern.
If line contains "abcdef" then delete that line.
Help greatly appreciated. (7 Replies)
Discussion started by: cronjob78
7 Replies