10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
Hope you are all doing fine.
The problem today i faced during my coding was i wanted to add a space equals to a tab character in front of all the lines which i am cat using tee command.
Main file contents
mainfile
... (4 Replies)
Discussion started by: mad man
4 Replies
2. Shell Programming and Scripting
Hello Gurus,
I wanted to put a single quote in every where starting with /oradata, and at the end with .dbf.
For example I have one line as below:
alter database rename datafile /oradata/test.dbf to /oradata_new/test.dbf I wanted as below
alter database rename datafile '/oradata/test.dbf' to... (3 Replies)
Discussion started by: pokhraj_d
3 Replies
3. Shell Programming and Scripting
I am just trying to add specific text in front of a ${variant} but can not seem to get the syntax correct.
I have tried sed -i '$a NM_004004.5' ${variant} and printf "NM_004004.5:%s\n" ${variant} with no luck.
Thank you :). (7 Replies)
Discussion started by: cmccabe
7 Replies
4. Linux
Please help to provide command in vi to add \ in front of $ so it does not interpret next character.
rm interfaces/DART/WEB-INF/classes/DART/util/TotalDisconnectUtil$1.class
rm interfaces/DART/WEB-INF/classes/DART/util/TotalDisconnectUtil$2.class
rm... (3 Replies)
Discussion started by: ywu081006
3 Replies
5. UNIX for Dummies Questions & Answers
I have a file and some records may contain double quotes at beginning and at end of line. So how do I strip them?
For Example, file is somethings like this
Field1;Field2;Field3
01;'Test';'Test Field3'
"01;'This is 2nd field';This is 3rd field' "
Desired Output is:
... (6 Replies)
Discussion started by: vx04
6 Replies
6. Shell Programming and Scripting
Hi
I've one file full of paths of certain files and I want to add some extra file words in front of all the paths. for eg:
i have a file name test.txt which show some details only..
024_hd/044/0344eng.txt
035_bv/222/editor.jpg
here I want to add /usr/people/indiana/ infront of all the... (4 Replies)
Discussion started by: ratheeshp
4 Replies
7. Shell Programming and Scripting
Hi ,
how to add the single digit to front of the word and front of the lines in the one file with compare pattern file and get digit. like example
pattern file pattern.txt
pattern num
bala 2
raja 3
muthu 4
File Name: chennai.dat
muthu is good boy
raja is bad boy
selvam in super... (6 Replies)
Discussion started by: krbala1985
6 Replies
8. Shell Programming and Scripting
Hi,
Can anybody help me how to add a word in front of a line in a file.Actually it is bit tricky to add a word. i will give a sample for this:
Input :
1110001 ABC DEF
1110001 EFG HIJ
1110001 KLM NOP
1110002 QRS RST
1110002 UVW XYZ
Output:
%HD% 1110001 ABC DEF
%DT% 1110001 EFG HIJ... (4 Replies)
Discussion started by: apjneeraj
4 Replies
9. Shell Programming and Scripting
Hi Forum,
Im trying to write some code to read a file, take a certain dynamic value and write it back to the file at the front of every line.
For example, file.txt is:
SIMPLE=HELLO
CONFIDENTIAL=false
SENDER=false
REQUIRED=true
FEEDBACK=false
UPDATE=false
REQUIRED=false
MAPPING=true... (9 Replies)
Discussion started by: ocelot
9 Replies
10. Shell Programming and Scripting
Hi everyon,
I am trying to search for a pattern in a file and add "//" to the begining of the file.
lets say i want to comment out a line from my codes. the line that should be commented out contains the word "reset". i need to search for the word "reset" and comment out that specific line. is... (5 Replies)
Discussion started by: ROOZ
5 Replies