Sponsored Content
Top Forums UNIX for Dummies Questions & Answers renaming file from text in a file Post 302317036 by Ygor on Sunday 17th of May 2009 10:47:13 PM
Old 05-17-2009
Try...
Code:
awk 'END{system("mv " FILENAME " " FILENAME "." $NF)}' testfile

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how can I bcp out a table into a text file including the header row in the text file

Hi All, I need to BCP out a table into a text file along with the table headers. Normal BCP out command only bulk copies the data, and not the headers. I am using the following command: bcp database1..table1 out file1.dat -c -t\| -b1000 -A8192 -Uuser -Ppassword -efile.dat.err Regards,... (0 Replies)
Discussion started by: shilpa_acc
0 Replies

2. Shell Programming and Scripting

Renaming a file use another file as a sequence calling a shl

have this shl that will FTP a file from the a directory in windows to UNIX, It get the name of the file stored in this variable $UpLoadFileName then put in the local directory LocalDir="${MPATH}/xxxxx/dat_files" that part seems to be working, but then I need to take that file and rename, I am using... (3 Replies)
Discussion started by: rechever
3 Replies

3. Shell Programming and Scripting

File renaming from list of names contained in another file

I have to rename a large number of files so that the name of each file corresponds to a code number that is given side by side in a list (textfile). The list contains in column A the filename of the actual files to be renamed and in column B the name (a client code, 9 digits) that has to be... (7 Replies)
Discussion started by: netfreighter
7 Replies

4. Shell Programming and Scripting

search text file in file if this file contains necessary text (awk,grep)

Hello friends! Help me pls to write correct awk and grep statements for my task: I have got files with name filename.txt It has such structure: Start of file FROM: address@domen.com (12...890) abc DATE: 11/23/2009 on Std SUBJECT: any subject End of file So, I must check, if this file... (4 Replies)
Discussion started by: candyme
4 Replies

5. Shell Programming and Scripting

Renaming a file and keep the extension of file as it is

Hi, I am trying to rename multiple filenames in a UNIX directory matching a specific condition. i=0 for file in `ls $filename` do echo "$file" #echo $i i=`expr $i + 1` mv $src_dir/${file} $src_dir/${file}_${i} done But this code renames the filenames and... (9 Replies)
Discussion started by: chetancrsp18
9 Replies

6. UNIX for Dummies Questions & Answers

Converting a text file with irregular spacing into a space delimited text file?

I have a text file with irregular spacing between values which makes it really difficult to manipulate. Is there an easy way to convert it into a space delimited text file so that all the spaces, double spaces, triple spaces, tabs between numbers are converted into spaces. The file looks like this:... (5 Replies)
Discussion started by: evelibertine
5 Replies

7. UNIX for Dummies Questions & Answers

Extracting lines from a text file based on another text file with line numbers

Hi, I am trying to extract lines from a text file given a text file containing line numbers to be extracted from the first file. How do I go about doing this? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies

8. Shell Programming and Scripting

Renaming file and check for the renamed file existence

Hi Am trying to move a file from one name to another When I do "ls" to check for the moved filename I can see the file but when I try the same with a script am unable.. I think am doing some pretty silly error.. please help.. toMove=`ls | grep -E "partition.+"` mv $toMove partition._org... (7 Replies)
Discussion started by: Priya Amaresh
7 Replies

9. Windows & DOS: Issues & Discussions

Renaming part of a text file ?

I have several files that are named like this "DotP_D14 - Verknüpfung" They all have the " - Verknüpfung" in common. I'd like to rename all of them to get rid of that last part. Is this possible with DOS on windows ? (1 Reply)
Discussion started by: pasc
1 Replies

10. Shell Programming and Scripting

Match text to lines in a file, iterate backwards until text or text substring matches, print to file

hi all, trying this using shell/bash with sed/awk/grep I have two files, one containing one column, the other containing multiple columns (comma delimited). file1.txt abc12345 def12345 ghi54321 ... file2.txt abc1,text1,texta abc,text2,textb def123,text3,textc gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
ljlatest(6x)							XScreenSaver manual						      ljlatest(6x)

NAME
ljlatest - prints the most recent public posts on livejournal.com. SYNOPSIS
ljlatest [--verbose] [--columns N] DESCRIPTION
The ljlatest script reads the most recent public posts made to livejournal.com, and prints them on stdout, after doing a rudimentary con- version of HTML to plain text. This script is just a wrapper around xscreensaver-text --url http://www.livejournal.com/stats/latest-rss.bml As of XScreenSaver 4.21, you can just use use above URL in the "Text URL" field on the "Advanced" tab in xscreensaver-demo(1). BUGS
This program makes it seem like morons have invaded your screen saver. The output is always ISO-8859-1, regardless of locale. SEE ALSO
http://www.livejournal.com/, xscreensaver(1), xscreensaver-text(1), fortune(1), phosphor(6x), apple2(6x), starwars(6x), fontglide(6x), dadadodo(1), webcollage(6x), driftnet(1) EtherPEG, EtherPeek COPYRIGHT
Copyright (C) 2003, 2005 by Jamie Zawinski. Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. No representations are made about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. AUTHOR
Jamie Zawinski <jwz@jwz.org>, 30-Aug-2003. X Version 11 5.15 (28-Sep-2011) ljlatest(6x)
All times are GMT -4. The time now is 08:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy