Search Results

Search: Posts Made By: doer
121,452
Posted By doer
Here's the solution if [ ! -n "$VALUE" ] ...
Here's the solution

if [ ! -n "$VALUE" ]
then
VALUE="21"
fi

if [ $VALUE -ne "21" ]
then
echo "$VALUE,$BSC_NAME,$BSC_ID" > $OUT_FILE/power_up.out
end if
121,452
Posted By doer
Sorry. Anyway i found the solution. Thank you so...
Sorry. Anyway i found the solution. Thank you so much for the help.
121,452
Posted By doer
can anyone help?
can anyone help?
121,452
Posted By doer
How to check for null or empty string
Hi,

I need to check for value not equal (<>) to 21 and not equal empty or null values.

Please modify this script

if [ $VALUE -ne "21" ]
then
echo "$VALUE,$BSC_NAME,$BSC_ID" >...
19,758
Posted By doer
nawk works
nawk works
19,758
Posted By doer
thanks. Your sed suggestion worked but i still...
thanks. Your sed suggestion worked but i still could not get it right with awk. Where did i go wrong?

BSC_ID=`echo $DATA | awk -F[_-] '{print $(NF-1)}'`
Result...
19,758
Posted By doer
yes your objective is absolutely correct but how...
yes your objective is absolutely correct but how do I use this command

sed 's/.*[-_]\([^-_][^-_]*\)[-_].*/\1/' myFile in my below script.


Myscript

for DATA in `cat $IN_FILE/a.txt`
do
...
19,758
Posted By doer
to more precise the number of underscores are not...
to more precise the number of underscores are not fixed in my file.

BSC403_JAIN03|3153_TropicalFarm_LIMJM1-3_97|
BSC403_JAIN03|3410_PantaiAcehPCEHM1_4_97|...
19,758
Posted By doer
when i use the BSC_ID=`echo $DATA | awk -F[_-]...
when i use the BSC_ID=`echo $DATA | awk -F[_-] '{print $(NF-1)}`

i get
BSC403_JAIN03
BSC403_JAIN03|3153_TropicalFarm_LIMJM1-3_97|
BSC403_JAIN03
BSC403_JAIN03|3410_PantaiAceh_PCEHM1_4_97|...
19,758
Posted By doer
How reverse cut or read rows of lines
Hi,

My records are like this
BSC403_JAIN03|3153_TropicalFarm_LIMJM1-3_97|
BSC403_JAIN03|3410_PantaiAceh_PCEHM1_4_97|
BSC406_BMIN02|1433_JomHebohTV3_COW7M1_11_97|


I want to extract the...
Showing results 1 to 10 of 10

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