Search Results

Search: Posts Made By: badrimohanty
4,066
Posted By badrimohanty
if conditional statement
Hi,

I have a script like this:
sample.sh

mapping=$1
if [ "$mapping" =="pass" ]
then
echo "program passed"
fi

I'm running the above script as ./sample.sh pass

The script is not...
3,531
Posted By badrimohanty
Thanks
Thanks a lot @Franklin52
It works fine...
3,531
Posted By badrimohanty
trim spaces and replacing value
Hi,
I have a file origFile.txt with values:
origFile.txt
.00~ 145416.02~ xyz~ ram kishor ~? ~ ~783.9
.35~ 765.76~ anh reid~ kelly woodburg ~nancy ~ ~?

Now each row in the file has value...
6,036
Posted By badrimohanty
Thanks all of you. If the origFile.txt has "...
Thanks all of you.

If the origFile.txt has " " (space) value for any of the columns then the space is getting trimmed. e.g.
origFile.txt
.00~ 145416.02~ ~ ram kishor
.35~ 765.76~ anh reid~...
6,036
Posted By badrimohanty
trim spaces in a file
Hi,
I'm new to shell programming. Need some help in the following requirement:

I have a file origFile.txt with values:
origFile.txt
.00~ 145416.02~ xyz~ ram kishor
.35~ ...
2,190
Posted By badrimohanty
Here goes the data in testing.conf ...
Here goes the data in testing.conf

[home@27]$ sed -n l testing.conf
ram=219\r$
param_file_219=/home/testDir\r$
ram_kumar=220\r$
param_file_220=/home/testdir1\r$

any suggestions???
2,190
Posted By badrimohanty
appending two strings
Hi,

I have a small doubt. Here is the code snippet for which the output that I'm getting are a bit surprising.

testing.sh

#!/bin/sh
arg_1=$1
echo "arg passed by user is:${arg_1}"...
3,248
Posted By badrimohanty
Thanks
Thanks a lot @vgersh99 and @summer_cherry
I really appreciate the help you people have provided...

---------- Post updated at 05:51 PM ---------- Previous update was at 10:56 AM ----------

Hi,...
5,916
Posted By badrimohanty
Shell Script for deleting the first line in a file
Hi,

Could any one please post the shell script for deleting the first line in a file?
3,248
Posted By badrimohanty
Thanks @vgersh99... I've a doubt. Let's say...
Thanks @vgersh99...
I've a doubt.
Let's say I have a parent script named parent_script.sh
and I'm calling sub_Script_1.sh, sub_Script_2.sh and sub_Script_3.sh inside that parent script.

The...
3,248
Posted By badrimohanty
Searching a string in a file
Hi,
I am new to unix shell scripting.
I have a requirement.
Could anyone help me writing the script for the same?
Here goes the requirement:
I have a config file let's say temp.config.
Here is...
63,596
Posted By badrimohanty
i'm using bash
i'm using bash
63,596
Posted By badrimohanty
There is some discripency in the result that I am...
There is some discripency in the result that I am getting in the below shell script.
I have a configuration file having data as
fileTest.conf:
----------------
file=abc
value=123

The Shell...
63,596
Posted By badrimohanty
how to concatenate values of two variables with an underscore(_) in between
Hi,
I'm new to shell programming.

I have two variables a and b
a=val1
b=val2

could anyone kindly post the shell script to concatenate the values of variable a and b with an underscore(_)...
25,752
Posted By badrimohanty
thanks
Thanks all of you.
Thanks a lot @rakeshawasthi
it works...
25,752
Posted By badrimohanty
read the external config file and assign the values to variables inside shell script
Hi,
Just explaining the requirement more elaborately:

data in temp.conf :
----------
a=10
b=7
c=8

My requirement:
----------------
check the temp.conf file using awk
find the value of...
25,752
Posted By badrimohanty
how to access variables in a config file inside a shell script
I'm writing a shell script. I want to put the variables in a separate config files and use those inside my script.
e.g. the config file (temp.conf)will have the values like
mapping=123...
Showing results 1 to 17 of 17

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