Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: PikK45
2,115
Posted By PikK45
There is not $PATH1 $PATH2 defined in the script....
There is not $PATH1 $PATH2 defined in the script.

Can you please paste the complete script or the proper input & output data?

Thanks
1,700
Posted By PikK45
use $NF --> Last field of the processing line
use $NF --> Last field of the processing line
789
Posted By PikK45
I would suggest you to have these timestamps in a...
I would suggest you to have these timestamps in a file which will not be modified by any other process.

So, for the first run of the script you can print "TimeBefore" to $CURRENT_DATE. The other...
699
Posted By PikK45
grep 2014[0-9][0-9][0-9][0-9]23 file
grep 2014[0-9][0-9][0-9][0-9]23 file
1,287
Posted By PikK45
Or key="phani;ravi;kiran" echo $key | tr...
Or

key="phani;ravi;kiran"
echo $key | tr ';' '\n' > keys.lst
grep -if keys.lst /home/t.txt > temp.txt

hope this helps :)
1,573
Posted By PikK45
@Pawan: We do not fulfill your requirements here....
@Pawan: We do not fulfill your requirements here. rather, we shall help to achieve them.

What do you mean by your last post? If you are not sure of how to run a script, I'd better say to take...
2,637
Posted By PikK45
#/bin/bash while [ 0 ] do #if 0b file...
#/bin/bash
while [ 0 ]
do
#if 0b file exists
if [ -e /ntwrk/common/backup_in_progress.txt ]
then
#Record the start time
tm=`date "+%Y%m%d %H%M"`
echo "$tm" >...
1,254
Posted By PikK45
awk '{ if( $1 == 1) $1 = "+1"; else if ($1 == 0)...
awk '{ if( $1 == 1) $1 = "+1"; else if ($1 == 0) $1= "-1"; print;}' inputfile

If you have the first column to be 1 and 0 only, then use awk '{ if( $1 == 1) $1 = "+1"; else $1= "-1"; print;}'...
2,139
Posted By PikK45
@Scriptor: May be the script that you use could...
@Scriptor: May be the script that you use could tell you what it is...

search for the "not a regular file".. there could be a check like below

if [ -f FILE ]
671
Posted By PikK45
DUPLICATE POSTS!!!
DUPLICATE POSTS!!!
1,083
Posted By PikK45
sed 's/[A-Z]-/-/g' input.txt
sed 's/[A-Z]-/-/g' input.txt
1,604
Posted By PikK45
awk is working fine. You may have to change...
awk is working fine.

You may have to change the IFS while reading :)
1,563
Posted By PikK45
grep ",Call Forward Not Reachable" *2013* | awk...
grep ",Call Forward Not Reachable" *2013* | awk 'BEGIN{OFS=FS=","}; {a=$4; $4=$36; $36=a;}1'
885
Posted By PikK45
I would go with Pamu's solution :) simple...
I would go with Pamu's solution :)

simple and effective
1,334
Posted By PikK45
I believe there are few changes needed. This will...
I believe there are few changes needed. This will definitely get into a infinite loop due to highlighted lines :)

May be you have to set a variable for the next second ;)
2,403
Posted By PikK45
ON doing this grep 'string' | awk '{print $2$3}' ...
ON doing this grep 'string' | awk '{print $2$3}' it is returning the values like this.

make sure what are the 2nd and the 3rd fields and proceed!!
4,097
Posted By PikK45
grep -q "^M" infile --> use Ctrl+V then Ctrl+M to...
grep -q "^M" infile --> use Ctrl+V then Ctrl+M to get ^M don't type ^ and M
3,124
Posted By PikK45
Try this :) do sqlplus...
Try this :)

do
sqlplus $usrname/$password@$dbSID <<-EOF
WHENEVER OSERROR EXIT 9;
WHENEVER SQLERROR EXIT SQL.SQLCODE;
prompt Connected to the database;
quit;
EOF ...
1,207
Posted By PikK45
The output is like this, ls ---> list all...
The output is like this,

ls ---> list all files & directories from the current directory

grep -e test ---> filter all files/directories with the name having "test" in it

NOTE: this output...
1,046
Posted By PikK45
You can also make use of export command :) ...
You can also make use of export command :)

a.sh
#!/bin/sh
echo "Testing 1st script"
x="Came from a.sh"
export $x
b.sh

b.sh
echo "Testing 2nd script"
echo $x
x=$x"Added at b.sh"
echo $x...
3,543
Posted By PikK45
Why go for NF when you have the columns fixed?? ...
Why go for NF when you have the columns fixed??

awk '{ print $2, $4}' file
1,137
Posted By PikK45
file=file1.csv if test -s "$file" ...
file=file1.csv
if test -s "$file"
then
while read line
do
a=$(echo $line | awk -F"," '{print $1}' )
...
1,296
Posted By PikK45
Try this, sed -n...
Try this,

sed -n 's/.*PROJECTTYPE=\(.*\)$/\1/p' or if you want that to be in a variable

sed -n "s/.*$var=\(.*\)$/\1/p"
962
Posted By PikK45
I agree with Yoda here. :) You can also use,...
I agree with Yoda here. :)

You can also use, if [ $VAR -gt 10 -a $VAR -le 20 ]
2,304
Posted By PikK45
Dear jazzyzha, I missed to add IN there....
Dear jazzyzha,

I missed to add IN there. mysql -uroot -pabcde smsd -e "DELETE FROM inbox WHERE senderNumber = '$BLOCKLIST'" should be changed to mysql -uroot -pabcde smsd -e "DELETE FROM inbox...
Showing results 1 to 25 of 73

 

Featured Tech Videos

All times are GMT -4. The time now is 03:35 PM.
Unix & Linux Forums Content Copyright 1993-2021. All Rights Reserved.
Privacy Policy