Sponsored Content
Full Discussion: Finding last row
Top Forums UNIX for Advanced & Expert Users Finding last row Post 84023 by vino on Wednesday 21st of September 2005 09:06:52 AM
Old 09-21-2005
Add this line to the script

Code:
FILENAME=${file##*/}

where file would hold contain the values

Code:
/foo/bar/filename.pdf
/foo/bar/filename with space.pdf
/foo/filename.txt

one at a time.

And FILENAME would hold filename.pdf filename with space.. et al.

vino
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Changing the column for a row in a text file and adding another row

Hi, I want to write a shell script which increments a particular column in a row from a text file and then adds another row below the current row with the incremented value . For Eg . if the input file has a row : abc xyz lmn 89 lm nk o p I would like the script to create something like... (9 Replies)
Discussion started by: aYankeeFan
9 Replies

2. Shell Programming and Scripting

Finding Minimum value per Row range of data

Here is an example of a file I am working with: C 4704 CB 1318 ASP 115 BGRF 1 weak 0.0% 4.33 C 4720 OD 1322 ASP 115 BGRF 1 weak 0.0% 3.71 O 4723 OD 1322 ASP 115 BGRF 1 weak 0.0% 3.48 O 4723 CG 1321 ASP 115 BGRF 1 weak 0.0% 4.34... (3 Replies)
Discussion started by: userix
3 Replies

3. Shell Programming and Scripting

Subtracting each row from the first row in a single column file using awk

Hi Friends, I have a single column data like below. 1 2 3 4 5 I need the output like below. 0 1 2 3 4 where each row (including first row) subtracting from first row and the result should print below like the way shown in output file. Thanks Sid (11 Replies)
Discussion started by: ks_reddy
11 Replies

4. UNIX for Dummies Questions & Answers

Finding files with one row then moving them

Hi guys can you please help me with a script to find files with one row the move the file to another directory the files are in /optima/prd/optdir/ZTE_BSS/Combiner/ZTE_2G/out/BSC_PS_Basic_Meas and I want to move them to /optima/prd/optdir/ZTE_BSS/Loader/error/ZTE_2G/BSC_PS_Basic_Meas ... (5 Replies)
Discussion started by: Dj Moi
5 Replies

5. UNIX for Dummies Questions & Answers

Finding row number along with length of row

I have a fixed length file and I want to find out row number along with row length. I have a program that give me the line length if it satisfy the condition; but i would like to add row number as well? How do I do that? while IFS= read -r line; do if ; then echo ${line} echo... (8 Replies)
Discussion started by: princetd001
8 Replies

6. Shell Programming and Scripting

Finding only one error in a row

I am using below code to validate whether datatype,length and date format is correct as defined in file_layout. Below code is able to find only one error in a row,if there is more than one error in a same row then code is not able to highlight second error. How to customize the below code to... (8 Replies)
Discussion started by: srivalli
8 Replies

7. Shell Programming and Scripting

Add Row from First Row (Split Row)

HI Guys, I have Below Input :- RepigA_hteis522 ReptCfiEtrBsCll_aofe MSL04_MSL2_A25_1A 0 9 MSL04_MSL2_A25_1B 0 9 MSL04_MSL2_A25_1C 0 9 RepigA ReptCfiEtrBsCll hteis522 aofe MSL04_MSL2_A25_1A 0 9 MSL04_MSL2_A25_1B 0 9 MSL04_MSL2_A25_1C 0 9 Split Data in two first row... (2 Replies)
Discussion started by: pareshkp
2 Replies

8. UNIX for Beginners Questions & Answers

Keep only the closet match of timestamped row (include headers) from file1 to precede file2 row/s

My original files are like this below and I distinguish them from the AP_ID (file1 has 572 and file2 has 544). Also, the header on file1 has “G_” pre-pended. NOTE: these are only snippets of very large files and much of the data is not present here. Original File 1: ... (36 Replies)
Discussion started by: aachave1
36 Replies

9. Shell Programming and Scripting

Splitting single row into multiple rows based on for every 10 digits of last field of the row

Hi ALL, We have requirement in a file, i have multiple rows. Example below: Input file rows 01,1,102319,0,0,70,26,U,1,331,000000113200000011920000001212 01,1,102319,0,1,80,20,U,1,241,00000059420000006021 I need my output file should be as mentioned below. Last field should split for... (4 Replies)
Discussion started by: kotra
4 Replies

10. UNIX for Beginners Questions & Answers

Keep only the closet match of timestamped row (include headers) from file1 to precede file2 row/s

This is a question that is related to one I had last August when I was trying to sort/merge two files by millsecond time column (in this case column 6). The script (below) that helped me last august by RudiC solved the puzzle of sorting/merging two files by time, except it gets lost when the... (0 Replies)
Discussion started by: aachave1
0 Replies
hwloc_topology_cpubind_support(3)			     Hardware Locality (hwloc)				 hwloc_topology_cpubind_support(3)

NAME
hwloc_topology_cpubind_support - SYNOPSIS
#include <hwloc.h> Data Fields unsigned char set_thisproc_cpubind unsigned char get_thisproc_cpubind unsigned char set_proc_cpubind unsigned char get_proc_cpubind unsigned char set_thisthread_cpubind unsigned char get_thisthread_cpubind unsigned char set_thread_cpubind unsigned char get_thread_cpubind unsigned char get_thisproc_last_cpu_location unsigned char get_proc_last_cpu_location unsigned char get_thisthread_last_cpu_location Detailed Description Flags describing actual PU binding support for this topology. Field Documentation unsigned char hwloc_topology_cpubind_support::get_proc_cpubind Getting the binding of a whole given process is supported. unsigned char hwloc_topology_cpubind_support::get_proc_last_cpu_location Getting the last processors where a whole process ran is supported unsigned char hwloc_topology_cpubind_support::get_thisproc_cpubind Getting the binding of the whole current process is supported. unsigned char hwloc_topology_cpubind_support::get_thisproc_last_cpu_location Getting the last processors where the whole current process ran is supported unsigned char hwloc_topology_cpubind_support::get_thisthread_cpubind Getting the binding of the current thread only is supported. unsigned char hwloc_topology_cpubind_support::get_thisthread_last_cpu_location Getting the last processors where the current thread ran is supported unsigned char hwloc_topology_cpubind_support::get_thread_cpubind Getting the binding of a given thread only is supported. unsigned char hwloc_topology_cpubind_support::set_proc_cpubind Binding a whole given process is supported. unsigned char hwloc_topology_cpubind_support::set_thisproc_cpubind Binding the whole current process is supported. unsigned char hwloc_topology_cpubind_support::set_thisthread_cpubind Binding the current thread only is supported. unsigned char hwloc_topology_cpubind_support::set_thread_cpubind Binding a given thread only is supported. Author Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code. Version 1.4.1 Mon Feb 27 2012 hwloc_topology_cpubind_support(3)
All times are GMT -4. The time now is 02:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy