Sponsored Content
Top Forums Shell Programming and Scripting AWK how to strip from right hand side Post 302158808 by zsoltika on Wednesday 16th of January 2008 10:18:05 AM
Old 01-16-2008
If using 'sed ' is an option:
Code:
for i in *.WIP; do 
echo $i 
mv $i `echo $i | sed 's/\..*$//'`.ixf
done

Or if you want (GNU) awk, and assuming the 1st dot in the filename separates all the extension(s):
Code:
for i in *.WIP; do 
echo $i 
mv $i `echo $i | gawk -F . '{print $1}'`.ixf
done

HTH,
Zsoltik@
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to place selected columns from a group of files side by side in a new file

Hi Everyone, I need a shell/perl script to bring selected columns from all the files located in a directory and place them in a new file side by side. File1: a b c d 2 3 4 5 f g h i .......... File2: I II III IV w x y z .............. and so on many files are there...... (8 Replies)
Discussion started by: ks_reddy
8 Replies

2. Shell Programming and Scripting

How to Merge / combine / join / paste 2 text files side-by-side

I have 2 text files, both have one simple, single column. The 2 files might be the same length, or might not, and if not, it's unknown which one would be longer. For this example, file1 is longer: ---file1 Joe Bob Mary Sally Fred Elmer David ---file2 Tomato House Car... (3 Replies)
Discussion started by: cajunfries
3 Replies

3. Web Development

Cannot access Apache web server from Wan side, only Lan side.

I have installed WAMPSERVER 2.0 on my windows vista x64 system but still am having issues with getting the webserver to be seen outside my local network. It is working fine within my local network. Been through several setup tutorials so far, no dice still. For testing purposes I have... (1 Reply)
Discussion started by: davidmanvell
1 Replies

4. Shell Programming and Scripting

Paste two file side by side together based on specific pattern match problem

Input file_1: P78811 P40108 O17861 Q6NTW1 P40986 Q6PBK1 P38264 Q6PBK1 Q9CZ49 Q1GZI0 Input file_2: (6 Replies)
Discussion started by: patrick87
6 Replies

5. Shell Programming and Scripting

printing 3 files side by side based on similar values in rows

Hi I'm trying to compare 3 or more files based on similar values and outputting them into 3 columns. For example: file1 ABC DEF GHI file2 DEF DER file3 ABC DER The output should come out like this file1 file2 file3 ABC ABC (4 Replies)
Discussion started by: zerofire123
4 Replies

6. Shell Programming and Scripting

AWK to merge multiple files side by side

I have about 100s of files of type text in a known directory. I want to merge all files side by side. Number of lines in all the files will remain same. For example file1 contains cat dog File 2 contains rat mat Output file should be cat rat dog mat Using awk I was able to... (5 Replies)
Discussion started by: kanthrajgowda
5 Replies

7. Shell Programming and Scripting

Merge left hand strings mapping to different right hand strings

Hello, I am working on an Urdu to Hindi dictionary which has the following structure: a=b a=c n=d n=q and so on. i.e. Headword separated from gloss by a = I am giving below a live sample بتا=बता بتا=बित्ता بتا=बुत्ता بتان=बतान بتان=बितान بتانا=बिताना I need the following... (3 Replies)
Discussion started by: gimley
3 Replies

8. Shell Programming and Scripting

Matching number of syllables on right-hand and left side

I am developing a database for translating names. I have mapped through a rule engine syllables in English to syllables in Indic, delimited by an equal to sign. An example will illustrate this ra m=रा म ku ma r=कु मा र mo=मो la l=ला ल gi ta=गी ता ka la va ti=कa ला वa ती However it so... (3 Replies)
Discussion started by: gimley
3 Replies
HWLOC-ASSEMBLER-REMOTE(1)					       hwloc						 HWLOC-ASSEMBLER-REMOTE(1)

NAME
hwloc-assembler-remote - Assemble multiple remote host topologies SYNOPSIS
hwloc-assembler-remote [options] output.xml host1 host2 ... OPTIONS
--ssh <ssh> Use the given ssh command (and options) to connect to remote hosts. --lstopo-path <path> Use the given path as the remote lstopo command when gathering remote topologies. By default, lstopo is taken from the PATH envi- ronment variable. --lstopo-opts <opts> Pass the given lstopo options when gathering remote topologies. --show Display the resulting topology before exit. -v --verbose Verbose messages. DESCRIPTION
hwloc-assembler-remote is a frontend to hwloc-assembler. It takes care of retrieving the remote nodes' topologies before assembling them with hwloc-assembler. EXAMPLES
To assemble three nodes topologies: $ hwloc-assembler-remote output.xml host1 host2 host3 To assemble the topology of a multi-process MPI job defined as a machinefile: $ hwloc-assembler-remote output.xml `cat machinefile | sort | uniq` RETURN VALUE
Upon successful execution, hwloc-assembler-remote returns 0. hwloc-assembler-remote will return nonzero if any kind of error occurs, such as (but not limited to) failure to parse the command line. SEE ALSO
hwloc(7), lstopo(1), hwloc-assembler(1) 1.4.1 Feb 27, 2012 HWLOC-ASSEMBLER-REMOTE(1)
All times are GMT -4. The time now is 11:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy