10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I wrote myself a small little shell script to clean up a file I have issues with. In particular, I am stripping down a fully qualified host/domain name to just the hostname itself. The script works, but from a performance standpoint, it's not very fast and I will be working with large data sets.
... (4 Replies)
Discussion started by: dagamier
4 Replies
2. UNIX for Dummies Questions & Answers
Hi ,
I would like to replace new line characters(\n) in a huge file of about 2 million records . I tried this one (:%s/\n//g) but it's hanging there and no result. Does this command do not work if the file is big. Please let me know if you have any other options
Regards
Raj (1 Reply)
Discussion started by: rajeevm
1 Replies
3. Shell Programming and Scripting
so i have strings such as this:
'postfix/local#2,5#|CRON.*12062.*root.*CMD#2,5#|roice.*NQN1#1,2#|toysprc#1,4#'
i need to get rid of the "#" and the numbers between them for each of the strings above. so the desired output should be:
... (1 Reply)
Discussion started by: SkySmart
1 Replies
4. Shell Programming and Scripting
Hi,
I'm trying to replace a range of characters by their position in each line by spaces.
I need to replace characters 95 to 145 by spaces in each line.
i tried below but it doesn't work
sed -r "s/^(.{94})(.{51})/\ /" inputfile.txt > outputfile.txt
can someone please help me... (3 Replies)
Discussion started by: Kevin Tivoli
3 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I require to replace 2 items:
1. replace start of all lines in a file with ' except the first line
2. replace end of all lines in a file with '||chr( except last line
I am able to do the entire file using
sed -e s/^/\'/g -e s/$/\'\|\|chr\(/g "$file" > newfile.txt
but am not yet... (3 Replies)
Discussion started by: Chella15
3 Replies
6. Shell Programming and Scripting
Hi,
I require to replace 2 items:
1. replace start of all lines in a file with ' except the first line
2. replace end of all lines in a file with '||chr( except last line
I am able to do the entire file using
sed -e s/^/\'/g -e s/$/\'\|\|chr\(/g "$file" > newfile.txt
but am not yet able... (0 Replies)
Discussion started by: Chella15
0 Replies
7. IP Networking
Hi. I need to trace on Unix level number of connections to an Oracle database. The listener runs on port 1521.
The following is run:
oracle@server03 >lsof -Pni |grep ".1521" |grep IPv4 | awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -nk 1
87 IPv4
oracle@server03 >
I need to append... (2 Replies)
Discussion started by: grigorianvlad
2 Replies
8. Shell Programming and Scripting
i have a file like this
1111_2222#$#$dudgfdk
11111111_343434#$#$334
1111_22222#43445667
i want to remove all those charachetrs from #
how can i do this
Thank in advance
Saravanan (4 Replies)
Discussion started by: saravanan71184
4 Replies
9. UNIX for Dummies Questions & Answers
Hi
my file data is like below
ramu,sony,"raju \n ravi \n ramya" \n
ravi,sarah,"sowmya \n sorry s\ sangam" \n
i want replace new line characters in between double coats with sinhle space.
for example
cat input_file
ramu,sony,"raju
ravi
ramya"
ravi,sarah,"sowmya
sorry
sangam"
... (3 Replies)
Discussion started by: Raghava
3 Replies
10. Shell Programming and Scripting
Hi all,
I have a file with multiple lines. I want to replace characters 7 through 14 of every line with 0000000
Input:
12345678901234567890
23456789012345678901
Output
12345600000004567890
23456700000005678901
Please help.
JaK (9 Replies)
Discussion started by: jakSun8
9 Replies