Search Results

Search: Posts Made By: rahulsk
1,282
Posted By rahulsk
Inserting value at a particular position without changing the position of other characters
Hi All,

I wanted a sed/awk command to add a value/character on a particular position without disturbing the position of other characters.

I have file a.txt

OL 10031 Day Black Midi Good...
1,415
Posted By rahulsk
Hi, Code given by Ravinder was fine. But had...
Hi,

Code given by Ravinder was fine. But had one issue. It was not printing all the given values.

awk -F"|" '{for(i=3;i<=NF;i++){print $1 "," $2 "," ++q "," $i >> "inclusion1"};q=""}' ...
3,938
Posted By rahulsk
I have this requirement to put space as a...
I have this requirement to put space as a substitution for some cases.

Isn't there any option to give space to a variable and use it in sed?
Because, I am using sed for replacing other strings in...
3,938
Posted By rahulsk
Using a variable in sed command
Hi All,

Please help me with the below problem


if [ "$a" == "RAHUL" ]
then
$a=" "
fi

echo "ABC1abc" | sed 's/a/'$a'/'



The required output is : ABC abc

But I am getting the...
9,429
Posted By rahulsk
Hi RudiC, Thanks for the details.. Can you...
Hi RudiC,

Thanks for the details..
Can you please help me in knowing what is the problem in the code what I have written?

---------- Post updated at 05:03 PM ---------- Previous update was at...
9,429
Posted By rahulsk
Printing null values in awk
Hi,

I have a csv file with given details
abc.txt

123,ra,point,,there
232,ba,points,home,pheer


I want to get those values and store them in different variables:

Code:

while read...
1,061
Posted By rahulsk
Retrieving details from a tag of xml file
Hi,

I want to retrieve details of a tag from xml file
1.xml

<abc> abcdefgh
ijklmn
opq
</abc>
<xyz>sdfsdf sdfsdfsdfgg </xml>


Required Output:

abcdefgh
ijklmn
opq
1,112
Posted By rahulsk
I am getting this error echo "ABCD" | cut -c2...
I am getting this error
echo "ABCD" | cut -c2 --complement
cut: Not a recognized flag: -
Usage: cut -b List [-n] [File...]
or: cut -c List [File...]
or: cut -f List [-d Character] [-s]...
1,112
Posted By rahulsk
Help with text modification and displaying
I have a file storing some text
and another file storing some numbers
I want to display characters other than the specified place of strings


one.txt
xyz abc 233 skfo 4r443
sfs abc abcd sd...
Forum: Red Hat 10-12-2015
1,050
Posted By rahulsk
Listing required files
-rwxrwxrwx 1 eurv1adm eurv1 62 Oct 7 07:42 sample.sh
-rwxrwxrwx 1 eurv1adm eurv1 1 Oct 12 08:47 new.sh
-rwxrwxrwx 1 eurv1adm eurv1 0 Oct 12 08:48 MIS322RRF.txt
-rw-r--r-- 1 eurv1adm eurv1 0...
Showing results 1 to 10 of 10

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