Sponsored Content
Top Forums Shell Programming and Scripting Bash command line to strip tar.gz file extension? Post 302772764 by alister on Tuesday 26th of February 2013 05:36:28 PM
Old 02-26-2013
Another variation on bipinajith's theme:
Code:
ls | sed -n '/\.tar\.gz$/s///p'

Regards,
Alister
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Strip one line from 2 blank lines in a file

Hi Is there any command to scan thru a file looking for 2 consecutive blank lines and if any remove one of them. Please let me know. Regards, Tipsy (6 Replies)
Discussion started by: tipsy
6 Replies

2. UNIX for Dummies Questions & Answers

Bash script to delete file input on command line

1) I wrote a script and gave the desired permissions using "chmod 755 scriptname". Now if i edit the script file, why do i need to set the permission again? Didn't i set the permission attribute.. or if i edit the file, does the inode number of file changes? 2) I am running my unix on a server... (1 Reply)
Discussion started by: animesharma
1 Replies

3. Shell Programming and Scripting

Conundrum - Flexible way to strip extension

Hi, First post here. I have something that may prove to be difficult. I have the following files: Example1.0.0.tar.gz Example2.tar Example3.zip Example4.0.0.0.0.0.bzip2 I need to remove the file extensions and store as a variable so they look like this: Example1.0.0 Example2... (3 Replies)
Discussion started by: Spadez
3 Replies

4. UNIX for Dummies Questions & Answers

UNIX command to check if file name ends with .tar OR if the file is a tar file

Hello Team, Would you please help me with a UNIX command that would check if file is a tar file. if we dont have that , can you help me with UNIX command that would check if file ends with .tar Thanks in advance. (10 Replies)
Discussion started by: sanjaydubey2006
10 Replies

5. Shell Programming and Scripting

Rename specific file extension in directory with match to another file in bash

I have a specific set (all ending with .bam) of downloaded files in a directory /home/cmccabe/Desktop/NGS/API/2-15-2016. What I am trying to do is use a match to $2 in name to rename the downloaded files. To make things a more involved the date of the folder is unique and in the header of name... (1 Reply)
Discussion started by: cmccabe
1 Replies

6. Shell Programming and Scripting

Modifying bash script to take each line in a file and execute command

I need to modify a bash script to to take each line in a file and execute command. I currently have this: #!/bin/bash if ; then echo "Lipsa IP"; exit; fi i=1 ip=$1 while ; do if ; then rand=`head -$i pass_file | tail -1` user=`echo $rand | awk '{print $1}'` pass=`echo $rand | awk '{print $2}'`... (3 Replies)
Discussion started by: galford
3 Replies

7. Shell Programming and Scripting

How to run several bash commands put in bash command line?

How to run several bash commands put in bash command line without needing and requiring a script file. Because I'm actually a windows guy and new here so for illustration is sort of : $ bash "echo ${PATH} & echo have a nice day!" will do output, for example:... (4 Replies)
Discussion started by: abdulbadii
4 Replies

8. Shell Programming and Scripting

Bash to trim folder and files within a path that share a common file extension

The bash will trim the folder to trim folder. Within each of the folders (there may be more than 1) and the format is always the same, are several .bam and matching .bam.bai files (file structure) and the bashunder that executes and trims the .bam as expected but repeats the.bam.bai extentions... (9 Replies)
Discussion started by: cmccabe
9 Replies

9. Shell Programming and Scripting

Bash to create sub directories from specific file extension

In the bash below I am trying to create sub-directories inside a directory from files with specific .bam extensions. There may be more then one $RDIR ing the directory and the .bam file(s) are trimmed (removing the extension and IonCode_0000_) and the result is the folder name that is saved in... (2 Replies)
Discussion started by: cmccabe
2 Replies

10. UNIX for Beginners Questions & Answers

How to tar an extension from a certain directory?

Im trying to make a tar file with only .txt file from a specific directory tar -cvf test.tar *.txt I have that part and tested it correctly but dont know where to put the path part of the command. I tried different placements... (8 Replies)
Discussion started by: mcesmcsc
8 Replies
metacity(1)							   User Commands						       metacity(1)

NAME
metacity, metacity--theme-viewer - GNOME desktop window manager, theme viewer for the metacity window manager themes SYNOPSIS
metacity [--sm-disable] [--sm-save-file=filename] [--display=display] [--replace] [--version] metacity-theme-viewer [theme-name] DESCRIPTION
metacity is a fully integrated window manager that uses GTK+ for UI elements. metacity communicates closely with the panel and other desk- top elements. To configure metacity, use the GNOME preferences dialogs. metacity-theme-viewer is an application for testing and displaying metacity themes. OPTIONS
The following options are supported: --display=displaSpecify the remote X Display to be used by the window manager, where display is in the following format: hostname:displaynumber.screennumber --help Display detailed usage message. You can also use -? to specify this option. --replace A metacity started with the ---replaceoption will replace an existing metacity. --sm-disable Disable the connection to the session manager. --sm-save-file=fSpecifies the session management file to be used. By default, the $HOME/.metacity/sessions file is used. --version Display the version information for the metacity command. OPERANDS
The following operands are supported: -theme-name Specifies the theme that metacity should use. If no theme is specified on the metacity-theme-viewer command line, metacity loads the Crux theme. An error message is displayed if the theme does not exist. EXAMPLES
Example 1: Starting metacity From the Command Line When a metacity is Already Running example% metacity --replace Example 2: Starting metacity With a Non-Default Session Management File example% metacity --sm-save-file=filename EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/metacity The command-line executable for the application. /usr/bin/metacity--themeTheecommand-line executable for the application. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-wm | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
Latest version of the GNOME Desktop User Guide for your platform. NOTES
Written by Laszlo Kovacs, Sun Microsystems Inc., 2003. SunOS 5.10 2 Oct 2003 metacity(1)
All times are GMT -4. The time now is 10:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy