10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
on ksh
What does the following do?
grep -v "toolbox" $home_oracle/.profile >$home_oracle/.profile.$$ Thanks.
Please use CODE tags as required by forum rules! (3 Replies)
Discussion started by: big123456
3 Replies
2. Shell Programming and Scripting
I am trying to get a simple min/max script to work with the below input. Note the special character (">") within it.
Script
awk 'BEGIN{max=0}{if(($1)>max) max=($1)}END {print max}'
awk 'BEGIN{min=0}{if(($2)<min) min=($2)}END {print min}'
Input
-122.2840 42.0009
-119.9950 ... (7 Replies)
Discussion started by: ncwxpanther
7 Replies
3. Shell Programming and Scripting
How to find total number of special character in a column?
I am using awk -f "," '$col_number "*$" {print $col_number}' file.csv|wc -l but its not giving correct output. It's giving output as 1 even though i give no special character?
Please use code tags next time for your code and... (4 Replies)
Discussion started by: AjitKumar
4 Replies
4. Shell Programming and Scripting
I am having issues escaping special characters in my AWK script as follows:
for id in `cat file`
do
grep $id in file2 | awk '\
BEGIN {var=""} \
{ if ( /stringwith+'|'+'50'chars/ ) {
echo "do this"
} else if ( /anotherString/ ) {
echo "do that"
} else {
... (4 Replies)
Discussion started by: purebc
4 Replies
5. UNIX for Advanced & Expert Users
Hi,
I want to add below line after end of a file (i.e file1)
&&echo "copy done" >> out.txt
cat file1
scp user1@server1:/tmp/dir /tmp/dir1
my requirment is
cat file1
scp user1@server1:/tmp/dir /tmp/dir1 &&echo "copy done" >> out.txt
could any one please help me (7 Replies)
Discussion started by: anshu ranjan
7 Replies
6. Shell Programming and Scripting
I have below line in a unix file, I want to delete one character after "Â".
20091020.Non-Agency CMO Daily Trade Recap Â~V Hybrids
The result should be :
20091020.Non-Agency CMO Daily Trade Recap  Hybrids
i dont want to use "~V" anywhere in the sed command or any other command, just remove... (1 Reply)
Discussion started by: mohsin.quazi
1 Replies
7. Shell Programming and Scripting
Hi,
My awk program is failing. I figured out using command
od -c filename
that the last line of the file doesnt end with a new line character.
Mine is an automated process because of this data is missing.
How do i handle this?
I want to append new line character at the end of last... (2 Replies)
Discussion started by: pinnacle
2 Replies
8. Shell Programming and Scripting
I have a script that produces an output containing '/.ssh'.
I am trying to find a way of parsing only this data from a single line, without removing any other special characters contained within the output as a result of the parse.
Any help would be appreciated (6 Replies)
Discussion started by: Raggedranger333
6 Replies
9. Shell Programming and Scripting
Hi,
I am trying to unload file from a database. Which contains few lines with the character below. Rest of the data was unloaded appropriately.
a) What does this below character means?
b) How can i remove it,
I already have sed '/^$/d'
c) Will this effect the file by any means... (4 Replies)
Discussion started by: tostay2003
4 Replies
10. Shell Programming and Scripting
Hi all,
I would like to replace some string in a text file by some string which would contains special characters like "/","\".
I.e. I have a text file with the statement contactperson somewhere in it.
Now I want to replace it by something else which includes special
characters like "/","\"
... (1 Reply)
Discussion started by: shareef
1 Replies