Search Results

Search: Posts Made By: Jag02
2,219
Posted By RudiC
Try sed -n '/row/ {:L; N; /\/row/ !bL;...
Try
sed -n '/row/ {:L; N; /\/row/ !bL; /<source_name>19<\/source_name>/ p; }' file
When found row, collect following lines until /row, and if the pattern space contains source...19..., print, else...
1,703
Posted By nezabudka
I would also replace this construction for i in...
I would also replace this construction
for i in ${3}/$file ; do
i="${i##*/}"
1,703
Posted By bakunin
much better indeed but why use any external...
much better indeed but why use any external utility when the shell can do the same:

for i in $(ls "${3}/${file}") ; do
i="${i##*/}"

The only way this is going to break is if the filename...
1,115
Posted By bakunin
sed -e 's/JAN_DAT_(.*\)\_([0-9]\{10\}\).*.csv/\1...
sed -e 's/JAN_DAT_(.*\)\_([0-9]\{10\}\).*.csv/\1 \2/g'

The first thing is: sed-patterns are always "greedy", which means they match the longest possible part of the line. A pattern like A.*B will...
1,115
Posted By bakunin
In this case: cut off the other parts with what i...
In this case: cut off the other parts with what i have showed you:

for file in /some/where/*csv ; do
path="${file%/*}" # remove the filename, leaving the path ...
1,407
Posted By MadeInGermany
This looks like a continuation of your earlier...
This looks like a continuation of your earlier thread in September (rather than homework/coursework).
Here is an awk script that does a merge like you want:
#!/bin/sh
awk '
$1=="}" { bl-- }
bl>0...
9,786
Posted By Scott
There is (as is always the case) a number of ways...
There is (as is always the case) a number of ways of doing this. Here's one with awk:

awk -F'"' '/EqName/ { sub(" ", "_", $2) }1' file
{
EqName Tan_1
....
....
}

{

EqName ...
Showing results 1 to 7 of 7

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