10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Seems simple but ive been searching for a good hour of so
I have a text file and would like to add a string to the end of line 5 ( as an example)
to ake tings hard the line number we have to add the text to is stored in a variable cunningly name $Line_to_append
any ideas on how this could... (2 Replies)
Discussion started by: dunryc
2 Replies
2. UNIX for Dummies Questions & Answers
How would you do vim copy line and paste at the beginning, middle, and end of another line. I know yy copies the whole line and p pastes the whole line, but on its own separate line. Sometimes I would like to copy a line to the beginning, middle, or end of another line. I would think this would be... (3 Replies)
Discussion started by: cokedude
3 Replies
3. Shell Programming and Scripting
After I create printer queues in AIX, I have to append a filter file location within that printers custom file. within lets say test_queue.txt I need to find the row that starts with :699 and then I need to append on the end the string /usr/local/bin/k_portrait.sh.
Now I've gotten the sed... (2 Replies)
Discussion started by: peachclift
2 Replies
4. Shell Programming and Scripting
how to use sed to put .txt end of line..my input file below
file1
make=^bak12^".
DEV=LONG^cmd/usr/bak/ade4^"
.....................................
file 2
make=^and_LONG/bak12^".
DEV=LONG^cmd/usr/bak/ban3^"
..........................................
file 3... (6 Replies)
Discussion started by: zulabc
6 Replies
5. Shell Programming and Scripting
I've scoured the internet with mixed results. As an amateur I turn to the great minds here.
I have a text file of 80 or so lines. I want to add ".pdf" to the end of each line. (For now that's it)
Most of the internet points toward using "sed". I don't know coding but can figure things out... (4 Replies)
Discussion started by: spacebase
4 Replies
6. Shell Programming and Scripting
Hi All,
I'm trying to run a similar script to copy a files from one location to another.
#!/bin/bash
source="/home/pradeepk/a.txt"
destination="/home/pradeepk/dir1"
cp $source $destinationi'm getting following error.
cp: cannot stat `/home/pradeepk/a.txt\r': No such file or directorywhen... (1 Reply)
Discussion started by: pradeep2002gs
1 Replies
7. Shell Programming and Scripting
Hi,
I just wanted to know if you have any idea or script to insert a text at everyend of the line, the text will vary. for example
sample:
this is line1 ok
this is line2 ok
this is line3 ok
output:
this is line1 ok /home/line1.txt
this is line2 ok /home/line2.txt
this is line3 ok... (6 Replies)
Discussion started by: invinzin21
6 Replies
8. Shell Programming and Scripting
Hi
I need to append some text @ end of the first line in a file.
like
myfile.txt
list = a,b,c
list.a=some..
I give the arg "d" . now it append at end of first line
list=a,b,c,d
list.a=some...
Please help me out this (7 Replies)
Discussion started by: catgovind
7 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
I am facing a strange situation and want to find why it is occuring . When i convert the whole line into Hexadecimal character i can find the junk value after new line (\n) . If i look in binary mode it is not visible.
PLease let me know how possible the junk character is added... (1 Reply)
Discussion started by: arunkumar_mca
1 Replies
10. Shell Programming and Scripting
I'm needing to add a "hour:min" to the end of each line in a document. The document in this case is only going to be one line.
if this inserts it at the end, what needs to be changed to add something at the end...
/bin/echo "%s/^/$filler/g\nwq!" | ex -s $oFile
Thank you... (2 Replies)
Discussion started by: cubs0729
2 Replies