Sponsored Content
Top Forums Shell Programming and Scripting Script solution as singleline ? Post 302971538 by RavinderSingh13 on Thursday 21st of April 2016 12:24:24 PM
Old 04-21-2016
Hello msuluhan,

Could you please try following and let me know if this helps you, as I don't have your find command's output so I couldn't test it.
Code:
find path -type d | awk -vs1="\"" -F "/" 'NF == 4{gsub(/custype=/,"custype=" s1,$0);gsub("/logdate",s1"/logdate",$0);print $3}'

Thanks,
R. Singh
 

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Please suggest a script or solution?

I have to solve a programming problem for my wife who is engaged in Research in Breast Cancer. 1. She has frequently to search a long single line of alphabetic characters (lower case) for an exact match of a string. e.g.... (4 Replies)
Discussion started by: nmsinghe
4 Replies

2. UNIX for Dummies Questions & Answers

How to get the script corrected to get the solution

Can anyone help it out, My Requirement: Actually i grep for the items in the atrblist (Result of it will provide the line where the item present and also the next line of where it presents)then it will be stored in $i.txt From tat result i wil grep 2nd word after getdate() word and store... (2 Replies)
Discussion started by: prsam
2 Replies

3. Shell Programming and Scripting

Merge multiline into Singleline

Hi, I'm newbie in this forum and I already searched regarding Merge multiline into singleline but I always found different result which is I don't want it like i want. Here is the data that i have it: *** ALARM 711 A1/BTS "MAD08B1 08ACPA0"U 090604 1040 RADIO X-CEIVER ADMINISTRATION BTS... (5 Replies)
Discussion started by: inteliduy
5 Replies

4. Shell Programming and Scripting

Perl script solution

Hi I need to do this thing in awk (or perl?). I try to find out how can I identify 1st and 2nd result from the OR expression in gensub: block='title Sata Mandriva kernel /boot/vmlinuz initrd /boot/initrd.img' echo "$block" | awk '{ x=gensub(/(kernel|initrd) /,"\\1XXX","g"); print x }' ... (12 Replies)
Discussion started by: webhope
12 Replies

5. Shell Programming and Scripting

Convert Singleline to Multilines

Hi All, Could you please help to get the below output: Input: J1,ELLA_1,ISDR,JJK,TRS J2,ROSTER,JACK J3,HUP ... ... ... Output: J1,ELLA_1 J1,ISDR J1,JJK J1,TRS (3 Replies)
Discussion started by: unme
3 Replies
RAKE(1) 						 Ruby Programmers Reference Guide						   RAKE(1)

NAME
rake -- Ruby Make SYNOPSIS
rake [--f Rakefile] [--version] [-CGNPgnqstv] [-D [PATTERN]] [-E CODE] [-I LIBDIR] [-R RAKELIBDIR] [-T [PATTERN]] [-e CODE] [-p CODE] [-r MODULE] [--rules] [variable=value] target ... DESCRIPTION
Rake is a simple ruby(1) build program with capabilities similar to the regular make(1) command. Rake has the following features: o Rakefiles (Rake's version of Makefiles) are completely defined in standard Ruby syntax. No XML files to edit. No quirky Makefile syntax to worry about (is that a tab or a space?). o Users can specify tasks with prerequisites. o Rake supports rule patterns to synthesize implicit tasks. o Flexible FileLists that act like arrays but know about manipulating file names and paths. o A library of prepackaged tasks to make building rakefiles easier. OPTIONS
--version Display the program version. -C --classic-namespace Put Task and FileTask in the top level namespace -D [PATTERN] --describe [PATTERN] Describe the tasks (matching optional PATTERN), then exit. -E CODE --execute-continue CODE Execute some Ruby code, then continue with normal task processing. -G --no-system --nosystem Use standard project Rakefile search paths, ignore system wide rakefiles. -I LIBDIR --libdir LIBDIR Include LIBDIR in the search path for required modules. -N --no-search --nosearch Do not search parent directories for the Rakefile. -P --prereqs Display the tasks and dependencies, then exit. -R RAKELIBDIR --rakelib RAKELIBDIR --rakelibdir RAKELIBDIR Auto-import any .rake files in RAKELIBDIR. (default is rakelib ) -T [PATTERN] --tasks [PATTERN] Display the tasks (matching optional PATTERN) with descriptions, then exit. -e CODE --execute CODE Execute some Ruby code and exit. -f FILE --rakefile FILE Use FILE as the rakefile. -h --help Prints a summary of options. -g --system Using system wide (global) rakefiles (usually ~/.rake/*.rake ). -n --dry-run Do a dry run without executing actions. -p CODE --execute-print CODE Execute some Ruby code, print the result, then exit. -q --quiet Do not log messages to standard output. -r MODULE --require MODULE Require MODULE before executing rakefile. -s --silent Like --quiet, but also suppresses the 'in directory' announcement. -t --trace Turn on invoke/execute tracing, enable full backtrace. -v --verbose Log message to standard output (default). --rules Trace the rules resolution. SEE ALSO
ruby(1) make(1) http://rake.rubyforge.org/ REPORTING BUGS
Bugs, features requests and other issues can be logged at <http://onestepback.org/redmine/projects/show/rake>. You will need an account to before you can post issues. Register at <http://onestepback.org/redmine/account/register>. Or you can send an email to the author. AUTHOR
Rake is written by Jim Weirich <jim@weirichhouse.org> UNIX
November 7, 2012 UNIX
All times are GMT -4. The time now is 08:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy