Search Results

Search: Posts Made By: PikK45
2,905
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
2,068
Posted By PikK45
use $NF --> Last field of the processing line
use $NF --> Last field of the processing line
1,013
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...
945
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,579
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 :)
2,072
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...
3,847
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,894
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,699
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 ]
1,167
Posted By PikK45
DUPLICATE POSTS!!!
DUPLICATE POSTS!!!
1,570
Posted By PikK45
sed 's/[A-Z]-/-/g' input.txt
sed 's/[A-Z]-/-/g' input.txt
2,216
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 :)
2,107
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'
1,149
Posted By PikK45
I would go with Pamu's solution :) simple...
I would go with Pamu's solution :)

simple and effective
1,677
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 ;)
3,295
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!!
6,960
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
4,689
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 ...
2,034
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,384
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...
6,213
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,405
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}' )
...
2,867
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"
1,247
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,792
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

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