Search Results

Search: Posts Made By: nails
6,070
Posted By nails
It looks to me that your expr syntax error has to...
It looks to me that your expr syntax error has to do with non-numeric data. I don't know what perl program $EpochSh does, but if it doesn't print out a number followed by a colon, you will have...
2,238
Posted By nails
I ran pravin27's sed command on my Solaris 9 box...
I ran pravin27's sed command on my Solaris 9 box running ksh and it works fine.

What shell are you using??
Perhaps the shell is not evaluating the command line arguments correctly.

Just...
4,418
Posted By nails
You cannot include a HERE document inside an awk...
You cannot include a HERE document inside an awk script. If I were doing it, I would determine the l_cust_num and then call the SQL script:



#!/bin/ksh

# UNTESTED
l_cust_num=`awk '{...
2,206
Posted By nails
Elixir_sinari's suggestion is definitely the most...
Elixir_sinari's suggestion is definitely the most fool proof, but is it accurate to say if the last field equals "st_cd;" or "dvr_id;", then change 344 to 344\\006:


#!/bin/ksh

awk ' {
...
2,274
Posted By nails
This is inefficient, I know, but just delete the...
This is inefficient, I know, but just delete the string, delete the string with a comment, and then add it to the end of the file.


#!/bin/ksh

cd /axxhome/prdv/script
if [[ $? -ne 0 ]]...
33,593
Posted By nails
I am fairly new to this forum so apologies if...
I am fairly new to this forum so apologies if this has been posted before. Fairly close to Shamrock's, but I like this numeric check from Bolsky's "The New Kornshell":


#!/bin/ksh
isnum()
{...
6,004
Posted By nails
This deletes the second to last line of a file...
This deletes the second to last line of a file from Eric Pement:


sed -e '$!{h;d;}' -e x datafile


The code is from his sed one-liner doc (http://www.pement.org/sed/sed1line.txt):
2,804
Posted By nails
deleted
deleted
914
Posted By nails
embedding a shell variable in sed: sed...
embedding a shell variable in sed:


sed -n ''"$i"'p' datafile

or

sed -n "${i}p" datafile
1,883
Posted By nails
sed help
Consider using a while loop instead of the for:


# untested
while read i
do
echo "$i"
done < TOP10.OUT
1,883
Posted By nails
sed help
I am assuming you are having problems embedding shell variables in sed:

sed 's/$TTest/$i/'

Try this:


# untested
sed 's/'"$T"'Test/'"$i"'/'


A word of warning: the way you are...
1,329
Posted By nails
Perl help
You are missing the last # for perl's substitution operator. I think it should be something like:


perl -i -npe "s#ARA_HOME.*#ARA_HOME=$ARA_HOME#;" $ENVPROP


I was able to create the same...
Showing results 1 to 12 of 12

 
All times are GMT -4. The time now is 10:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy