Sponsored Content
Top Forums Shell Programming and Scripting Grep File Full Path in a file Post 302970366 by balajesuri on Wednesday 6th of April 2016 04:20:24 AM
Old 04-06-2016
Code:
[user@host ~]$ cat file
xxxxxxxxxxxxxxxxx
xxxxx/root/cdrive/picure.BMP xxxx
xxxxxxxxxxx
xxxxx/root/ddrive/picure.BMP xxxx
xxxxxxxxxxx
[user@host ~]$ grep -o '/.*\.BMP' file
/root/cdrive/picure.BMP
/root/ddrive/picure.BMP
[user@host ~]$

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

extract only file name from full path file name

What is the smartest way to just extract file name from a full path name. e.g. if I have /usr/sanjay/bin/file_name.c I want only file_name.c Sanjay (2 Replies)
Discussion started by: sanjay92
2 Replies

2. UNIX for Advanced & Expert Users

process executable file full path

hi guys i give "ps -ef | grep some_executable_file" on the command line. this "some_executable_file" resides on many paths which r included in the PATH environment variable, so the output depicts only "some_executable_file" in the COMMAND column. how can i get the full path? thanx (3 Replies)
Discussion started by: xtrix
3 Replies

3. UNIX for Advanced & Expert Users

list all files with full path of the file

How can i list every single file on a sun solaris server running 2.8 starting from '/' with the full path included in it? example. / ... ... ... /etc/inetd.conf /etc/passwd /etc/shadow ... ... ... /var/adm/messages /var/adm/messages.0 /var/adm/messages.1 ... ... ...... (4 Replies)
Discussion started by: Sowser
4 Replies

4. Shell Programming and Scripting

getting full path from relative path

given a relative path, how do i convert it into a full one. i.e. if i am in /home/polypus and i am given foo/bar then to get a full path i can just concatinate it with pwd, but what if i am given "../mama" how do i programmatically convert: /home/polypus and ../mama into ... (4 Replies)
Discussion started by: polypus
4 Replies

5. Shell Programming and Scripting

to find the file with full path

Hi, I have written this shell script: fl=`ls -1lrt $mylist | grep '\.xml$' | awk '{print $9}'` echo $fl (1) for i in $fl do for dir in $mylist do if then echo $dir/$i >> tmp (2) fi done done The mylist contains some directory names. The satement (1) gives the sorted list... (5 Replies)
Discussion started by: surjyap
5 Replies

6. Shell Programming and Scripting

list file with full path

This has been bugging me for a while. How can i list file to show full path. /directory/test $ ls file.tst file.tst $ desired output: /directory/test/file.tst (2 Replies)
Discussion started by: ryandegreat25
2 Replies

7. 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

8. Shell Programming and Scripting

Return Full File Path To Array PERL

Iam trying to load the full path of multiplie files in the same directory to an array if the filenames matches a pattern. The following is the current code; where $input=C:\test # change to and open the comparison directory chdir("$input2") || die "Cannot change dir: $!"; opendir(DIR2,... (2 Replies)
Discussion started by: cold_Que
2 Replies

9. Shell Programming and Scripting

How to extract strings from full path when full path is not fixed

/Path/snowbird9/nrfCompMgrRave1230100920.log.gz:09/20/2010 06:14:51 ERROR Error Message. /Path/snowbird6/nrfCompMgrRave1220100920.log.gz:09/20/2010 06:14:51 ERROR Error Message. /Path/snowbird14/nrfCompMgrRave920100920.log.gz:09/20/2010 06:14:51 ERROR Error Message.... (0 Replies)
Discussion started by: Shirisha
0 Replies

10. Linux

How to print full path name along with file extension?

Hi I have a requirement like this: /abc/a/x.txt /abc/a/y.txt /abc/b/x.gz /abc/b/y.txt I need output like this: /abc/a:*.txt /abc/b:*.txt /abc/b:*.gz I have tried find /abc -type f -name "*.*" ||awk -F . '{print $NF}' it is print only extensions without path name. Please... (5 Replies)
Discussion started by: lijjumathew
5 Replies
ppmtobmp(1)						      General Commands Manual						       ppmtobmp(1)

NAME
ppmtobmp - convert a portable pixmap into a BMP file SYNOPSIS
ppmtobmp [-windows] [-os2] [-bpp=bits_per_pixel] [ppmfile] DESCRIPTION
Reads a portable pixmap as input. Produces a Microsoft Windows or OS/2 BMP file as output. OPTIONS
All options can be abbreviated to their shortest unique prefix and you can use a double dash in place of the single dash, GNU-style. -windows Tells the program to produce a Microsoft Windows BMP file. (This is the default.) -os2 Tells the program to produce an OS/2 BMP file. (Before August 2000, this was the default). -bpp This determines how many bits per pixel you want the BMP file to contain. Only 1, 4, 8, and 24 are possible. By default, ppmtobmp chooses the smallest number with which it can represent all the colors in the input image. If you specify a number too small to represent all the colors in the input image, ppmtobmp tells you and terminates. You can use ppmquant or ppmdither to reduce the number of colors in the image. NOTES
To get a faithful reproduction of the input image, the maxval of the input image must be 255. If it is something else, ppmtobmp the colors in the BMP file may be slightly different from the colors in the input. Windows icons are not BMP files. Use ppmtowinicon to create those. SEE ALSO
bmptoppm(1), ppmtowinicon(1), ppmquant(1), ppmdither(1), ppm(5) AUTHOR
Copyright (C) 1992 by David W. Sanderson. 13 June 2000 ppmtobmp(1)
All times are GMT -4. The time now is 12:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy