Sponsored Content
Top Forums Shell Programming and Scripting Better Align--output of find command Post 302943835 by praveenkumar198 on Wednesday 13th of May 2015 08:34:09 AM
Old 05-13-2015
Sorry..it just been few days(max 5 days) working with shell. Dont know awk but will try hand on that for sure.

Better aligned means better or proper spacing to make them look better for reading and understnding :-
I am just writing space to make my point because when i am submitting tab is getting auto removed in the forum.

Code:
File name is:- Hello.txt{SPACE}--/home/pks/Destop/sumit/Dirty/empty_dir/empty.file{Space}/home/pks/Desktop/sumit/empty.file 
File name is:- HelloWorld.py{ }--/home/pks/Destop/sumit/Dirty/HelloWorld.py{Space Space }/home/pks/Desktop/sumit/HelloWorld.py

Moderator's Comments:
Mod Comment Use CODE tags around all sample input, output, and code. The CODE tags will preserve spaces and tabs so everyone reading your posts will be able to see what you are working with.

Last edited by Don Cragun; 05-13-2015 at 11:32 PM.. Reason: Add CODE tags.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to underline/bold and how to align output

Hi, I work with AIX 5 and have two basic questions: 1) How do I underline/bold a word in a text output? Any way to do it with echo command? basic example: echo "FOLDER " >> folder.txt ( I wish the word FOLDER to be underlined and bold). 2) Suppose I have the following pipe delimited... (1 Reply)
Discussion started by: clara
1 Replies

2. UNIX for Dummies Questions & Answers

output of find command

Hi, I am confused about the output of find command. Please see the two find commands below. When i put "*.c" i get lots of files. But when i put *c only i get only one file. Any answer?? $ find . -name "*c" ./clarify/cheval/hp_server/rulemanager/rulemansvc... (3 Replies)
Discussion started by: shriashishpatil
3 Replies

3. Shell Programming and Scripting

hiding output from find command

when I do the find command from / , there are a lot of directories that I do not have access to and so I get "find: cannot open ..." How can I suppress these messages so only what was found is output. I was thinking on find / -name 'searchterm' | grep -v find but this doesnt work ... (5 Replies)
Discussion started by: JamesByars
5 Replies

4. Shell Programming and Scripting

Paste Command does not align my output

I'm trying to "paste" two files but the result is not aligned. File1 looks like this: dog.csv cat.csv elephant.csv cougar.csv File2 looks like this: 2323 33 444 545545 Then I run a paste command: paste File1 File2 > result.cnt Then result.cnt file is created like this:... (4 Replies)
Discussion started by: jplayermx
4 Replies

5. Shell Programming and Scripting

Incorrect output using find command

I'm using the below command to list files older than 2 hours but it returns redundant output, am I missing something. # find . -mmin +120 -exec ls -l {} \; total 0 -rw-r--r-- 1 root system 0 Oct 13 09:52 test1 -rw-r--r-- 1 root system 0 Oct 13 09:52 test2 -rw-r--r-- 1 root ... (5 Replies)
Discussion started by: mbak
5 Replies

6. UNIX for Dummies Questions & Answers

problem with output of find command being input to basename command...

Hi, I am triying to make sure that there exists only one file with the pattern abc* in path /path/. This directory is having many huge files. If there is only one file then I have to take its complete name only to use furter in my script. I am planning to do like this: if ; then... (2 Replies)
Discussion started by: new_learner
2 Replies

7. Shell Programming and Scripting

Wrong output in find command

Hi guys - I am trying a small script to tell me if there is a file that exists less than 1k. It should report ERROR, otherwise the check is good. I wrote this script down, however it never runs in the if/then statement. It always returns the echo ERROR. MYSIZE=$(find /home/student/dir1... (8 Replies)
Discussion started by: DallasT
8 Replies

8. AIX

find command modify the output

Hello All, I am new to this shell scripting , I wanted to modify the output of my find command such that it does not display the path but only file names , for example I am searching for the files which are modified in the last 24 hours which is find /usr/monitor/text/ -type f -mtime... (3 Replies)
Discussion started by: raokl
3 Replies

9. Shell Programming and Scripting

Output of find command to variable?

Hi, I'd like to assign the output of the find command to a variable. What I need is to run the find command, and if it returns zero files, the program exits. so i'm trying to assign the output of the find command to the $var1 variable....and then if this is less than one, I echo a... (2 Replies)
Discussion started by: horhif
2 Replies

10. Shell Programming and Scripting

Compare the output of find command

Hi All, I am trying to run find command in a script to list out certain files based on a patter. However, when there is no file in the output, the script should exit. Tried a couple of operators (-n, -z) etc but the script does not work. I am confused whether a null string is returned... (3 Replies)
Discussion started by: danish0909
3 Replies
TRASH-EMPTY(1)						      General Commands Manual						    TRASH-EMPTY(1)

NAME
trash-empty - Empty for Command line trash utility. SYNOPSIS
trash-empty [arguments] DESCRIPTION
Remove for ever any trashed file and trashed directory. This command is a part of trash-cli package that provides a command line interface trashcan utility compliant with the FreeDesktop.org Trash Specification. It remembers the name, original path, deletion date, and permis- sions of each trashed file. ARGUMENTS
To remove all trashed files, use 'emtpy-trash'. To remove files that have been in the trash more than a given number of days, use 'trash-empty x', 'x' representing the number of days. EXAMPLES
$ date Tue Feb 19 20:26:52 CET 2008 $ trash-list 2008-02-19 20:11:34 /home/einar/today 2008-02-18 20:11:34 /home/einar/yesterday 2008-02-10 20:11:34 /home/einar/last_week $ trash-empty 7 $ trash-list 2008-02-19 20:11:34 /home/einar/today 2008-02-18 20:11:34 /home/einar/yesterday $ trash-empty 1 $ trash-list 2008-02-19 20:11:34 /home/einar/today $ trash-empty $ trash-list <none> BUGS
Report bugs to http://code.google.com/p/trash-cli/issues AUTHORS
Trash was written by Andrea Francia <andreafrancia@users.sourceforge.net> and Einar Orn Olason <eoo@hi.is>. This manual page was written by Steve Stalcup <vorian@ubuntu.com>. Changes made by Massimo Cavalleri <submax@tiscalinet.it>. SEE ALSO
trash-put(1), trash-restore(1), trash-list(1), and the FreeDesktop.org Trash Specification at http://www.ramendik.ru/docs/trashspec.html. Both are released under the GNU General Public License, version 2 or later. TRASH-EMPTY(1)
All times are GMT -4. The time now is 07:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy