Sponsored Content
Full Discussion: Parse Directory path - awk
Top Forums Shell Programming and Scripting Parse Directory path - awk Post 303039557 by greycells on Wednesday 9th of October 2019 09:24:05 AM
Old 10-09-2019
Hi ...

It most likely won't ..
Example it could be something like this .. input i mean

Code:
level1,/level2/level3/level4/ora001,10,IBB23
level1,/level2/level3/level4/ora002,,IBB24
level1,/level2/level3/level4/ora001/blu1,,IBB23
level1,/level2/level3/level4/ora001/clu1,,IBB23
level1,/level2/level3/level4/ora002/bbu1,20,IBB24
level1,/level2/level3/level4/ora002/ccu1,20,

Moderator's Comments:
Mod Comment Please use code tags

Last edited by vgersh99; 10-09-2019 at 10:45 AM.. Reason: code tags, please!
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Parse value from multiple row to create the path

Hi all, Hope all the expert can help me in this situation. Let say I have one file with multiple record like below: NAME=FRAGMENT LANGUAGE=1 DIALECT=0 GENDER=NONE FILE=TEST1 DIRECTORY=D:/DETAILS/1/0/test1.txt END NAME=FRAGMENT LANGUAGE=1 DIALECT=0 GENDER=NONE (13 Replies)
Discussion started by: shirleyeow
13 Replies

2. UNIX for Dummies Questions & Answers

awk to parse a directory name?

Hi, I have a directory file name: /auto/space/user/jen/CED/CED_01MZ/visit1/DCE_2eco/016/echo1 I would like to just get the following outputs into variables such that: variable1 = /auto/space/user/jen/CED/CED_01MZ/visit1/ and variable2 = DCE_2eco/016/echo1 I've tried it with... (2 Replies)
Discussion started by: nixjennings
2 Replies

3. Shell Programming and Scripting

Retrieve directory path from full file path through sh

Hi, I have a file abcd.txt which has contents in the form of full path file names i.e. $home> vi abcd.txt /a/b/c/r1.txt /q/w/e/r2.txt /z/x/c/r3.txt Now I want to retrieve only the directory path name for each row i.e /a/b/c/ /q/w/e/ How to get the same through shell script?... (7 Replies)
Discussion started by: royzlife
7 Replies

4. Shell Programming and Scripting

sed/awk for extracting directory from file path

Hi, I have following path: set file_path = D:/forums/prac/somedir/new1/file1.txt or set file_path = E:/new/forums1/prac/somedir/new2/file2.txt I need to grep "somedir" from file path. In this case preceding directory "prac" remains same for both the paths, but directories preceding... (7 Replies)
Discussion started by: sarbjit
7 Replies

5. Shell Programming and Scripting

Parse file name out of UNC path

Hello, I searched the forums and didn't see a situation like this: I cannot figure out how to parse out just the file name from the full path. The path looks like this: \\foo\bar\filename.ext I don't think something like 'cut' will work so I tried to whip up a regex but couldn't get it... (12 Replies)
Discussion started by: bytesnoop
12 Replies

6. Shell Programming and Scripting

Parse output path to set variable

I am looking to parse a text file output and set variables based on what is cropped from the parsing. Below is my script I am looking to add this feature too. All it does is scan a certain area of users directories for anyone using up more than X amount of disk space. It then writes to the... (4 Replies)
Discussion started by: es760
4 Replies

7. Shell Programming and Scripting

Variable of Path directory is not parsing in awk

Hi All, i had to split one files into 10 equally. For that i have coded below awk. OUTPUT_FILE=/home/sit/path/Files/file_EXPORT.lst DIR_NM=`dirname ${OUTPUT_FILE}` awk -v CURR_DATE="$(date +'%d-%m-%Y-%H-%M')" -v pth=$DIR_NM '{print >> pth/"tgt_file_name"CURR_DATE"_"NR%10 }' ${OUTPUT_FILE} ... (7 Replies)
Discussion started by: looney
7 Replies

8. UNIX for Beginners Questions & Answers

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 convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Discussion started by: Sekhar419
4 Replies

9. UNIX for Beginners Questions & Answers

What is the difference ../directory path and ./directory path in ksh?

What is the difference ../directory path and ./directory path in ksh? (1 Reply)
Discussion started by: TestKing
1 Replies
BLAS-TEST(1)						     Linux Programmer's Manual						      BLAS-TEST(1)

NAME
x{s,d,c,z}c?blat{1,2,3} - testing programs for blas SYNOPSIS
x{s,d,c,z}c?blat1 x{s,d,c,z}c?blat{2,3} < parameter file DESCRIPTION
This manual page documents briefly the blas testing programs. This manual page was written for the Debian GNU/Linux distribution because the original programs do not have manual pages. blas is a library of Basic Linear Algebra routines, accessed through either a Fortran and/or a C interface. These routines are categorized into three levels: level1 referring to vecotr-vector operations, level2 to matrix-vector operations, and level3 to matrix-matrix opera- tions. In addition, all routines are written in four "precisions", single precision real (s), double precision real (d), cingle precision complex (c), and double precision complex (z). The testing binaries examine routines in the level indicated by the last character in the program name and in the precision indicated by the second character in the program name. The stem "blat" in the program name refers to a Fortran interface tester, whereas a "cblat" stem refers to a C interface tester. The test programs for levels 2 and 3 read a set of parameters specifying the problem ranges to examine on standard input. Sample input files are found in /usr/share/doc/blas-test/examples. Files of the form {s,d,c,z}in{2,3} are input files for the C interface testing pro- grams, while files or the form {s,d,c,z}blat{2,3}d are input files to the Fortran testing programs. On Debian systems, these programs are dynamically linked against the blas library. This enables the user to test and compare alternate versions of the library, such as those provided by atlas, through the use of the LD_LIBRARY_PATH and LD_PRELOAD environment variables. One can confirm the versions of the libraries being tested in a given environment with the aid of the ldd program. OPTIONS
These programs take no command line options. AUTHOR
This manual page was written by Camm Maguire <camm@enhanced.com>, for the Debian GNU/Linux system (but may be used by others). netlib January 29, 2002 BLAS-TEST(1)
All times are GMT -4. The time now is 05:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy