Search Results

Search: Posts Made By: Sekhar419
8,028
Posted By Sekhar419
#!/bin/bash Spec=$( find . -name "*.spec" |...
#!/bin/bash

Spec=$( find . -name "*.spec" | sed 's/build.spec//g' )
hits=()
for each in ${Spec[@]}; do
mhits=()

hits=$( grep -rs "src +=" ${each}/build.spec | tr -d "(){}")
for hit in...
8,028
Posted By Sekhar419
Convert Relative path to Absolute path, without changing directory to the file location.
Hello,

I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can...
1,576
Posted By Sekhar419
@Rudic Thank you it worked. find ....
@Rudic

Thank you it worked.

find . -type f \( -name \*.spec -o -name \*.mk \) | xargs grep -E 'PROTOBUF_DIRS|PXC' |awk '/PROTOBUF_DIRS/ && match ($0, /PXC[^_]*_1/) {print substr ($0, RSTART,...
1,576
Posted By Sekhar419
How to delete everything present on left (or right) of a substring?
Hello,

I have list of lines from which i am trying to pick a sub string and want to put that into a csv file, the sub string i want to extract is at the middle of the line, i was wondering how can...
3,846
Posted By Sekhar419
How to insert subnode in xml file using xmlstarlet or any other bash command?
I have multiple xml files where i want to update a subnode if the subnode project points to different project or insert a subnode if it doesn't exist using a xmlstarlet or any other command that can...
1,452
Posted By Sekhar419
wisetracker sorry i have edited it just to make...
wisetracker sorry i have edited it just to make it clear for everyone who reads this thread, after you comment i realized it would be a common question for everyone so i have edited, I am new to this...
1,452
Posted By Sekhar419
wisecracker, ${MY_GIT_TOP} , takes me to the top...
wisecracker, ${MY_GIT_TOP} , takes me to the top of the project i am working on, once i source my gitenv it is set.
1,452
Posted By Sekhar419
How to use exit status of two commands in if statement ?
I am trying to write a shell script, which looks like

#!/usr/bin/env bash
#set -e

RED="`tput setaf 1`"
GREEN="`tput setaf 2`"
BLUE="`tput setaf 4`"
NORM="`tput sgr0`"

pushd...
1,400
Posted By Sekhar419
Thanks Rudic! i have replaced the ?????? in the...
Thanks Rudic! i have replaced the ?????? in the awk script and substituted them with numbers now i have tried it and it works.

I will try your suggestion as well.
1,400
Posted By Sekhar419
Thanks Don Cragun, it is prints what i wanted it...
Thanks Don Cragun, it is prints what i wanted it to look like . I am using bash shell, I have used nextfile displayed the same thing.

but how can do the same thing for the all the 14 files I have...
1,400
Posted By Sekhar419
How to change name of the file with first line of the file which has some unwanted text in it?
I have a log file, which i have divided into 14 files using csplit, the file looks like below

test-000000
test-000001 #and so on until 14
now I want all the 14 files generated to be renamed as...
Showing results 1 to 11 of 11

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