10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to append file names at the beginning of a line for each row
file content
abc.txt.gz 123|654|987
bcd.txt.gz 876|trf|kjh
I want a single output file with below format
abc.txt.gz|123|654|987
bcd.txt.gz|876|trf|kjh
This one is working but only with unzip files,need to have... (3 Replies)
Discussion started by: rakesh5300
3 Replies
2. Shell Programming and Scripting
Hi
from a script i want to to read a file beginning at line e.g. number 21 to the EOF.
less +n21 temp.txt
Bevor the result, it brings an empty page, so that i cant use for scripting.
Any idea how the problem can be solved?
Thanks in advance!
IMPe (2 Replies)
Discussion started by: IMPe
2 Replies
3. Shell Programming and Scripting
I need to comment the lines starting with pattern "exclude" or "exclude=". If the work exclude comes at any other part, ignore it. Also, ignore, excludes, excluded etc. Ie only comment the line starting with exclude.
File contents.
exclude
exclude=
hi I am excluded
excludes
excludes=
... (9 Replies)
Discussion started by: anil510
9 Replies
4. 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
5. Shell Programming and Scripting
hi I am trying to use SED to replace the line matching a pattern using the command
sed 'pattern c\
new line
' <file1 >file 2
I got two questions
1. how do I insert a blank space at the beginning of new line?
2. how do I use this command to execute multiple command using the -e... (5 Replies)
Discussion started by: piynik
5 Replies
6. UNIX for Dummies Questions & Answers
How can I specify special meaning characters like ^ or $ inside a regex range. e.g
Suppose I want to search for a string that either starts with '|' character or begins with start-of-line character.
I tried the following but it does not work:
sed 's/\(\)/<do something here>/g' file1
... (3 Replies)
Discussion started by: jawsnnn
3 Replies
7. Solaris
How can we delete all the blank spaces in the beginning of some lines in a text in vi?
Thanks, (2 Replies)
Discussion started by: Pouchie1
2 Replies
8. Shell Programming and Scripting
Hi!
I store some data obtained with grep or awk in a file. The problem is that some lines have white space at the begining :
line1
line2
line3
I use something like
grep WORD INFILE >> OUTFILE
awk >> OUTFILE
I would love if it were possible to remove the white whitout parsing the... (4 Replies)
Discussion started by: tipi
4 Replies
9. UNIX for Advanced & Expert Users
Hi
file1.txt contains
GigabitEthernet1/1
GigabitEthernet1/2
GigabitEthernet2/2
GigabitEthernet2/4
GigabitEthernet2/14
GigabitEthernet2/16
can anyone show me how to modify it as below. there is a space at the beginning of the next two lines . ie 'no shut' and 'switch..'
!... (8 Replies)
Discussion started by: Aejaz
8 Replies
10. Shell Programming and Scripting
Could anybody help me.
I need to create a script that reads a text file from STDIN and prints out the file to STDOUT with line numbers at the beginning of each line.
Thanks. (5 Replies)
Discussion started by: mascorro
5 Replies