Sponsored Content
Full Discussion: Combination awk and rename
Top Forums Shell Programming and Scripting Combination awk and rename Post 302844164 by Corona688 on Friday 16th of August 2013 05:55:45 PM
Old 08-16-2013
Your file is full of carriage returns, probably generated by MS Windows.

Code:
awk '/Sample ID/ { sub(/\r/,""); print "echo mv test.pdf "$3".pdf"); }' sampleid.txt | sh

This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

awk and file combination

Hi there, I have 3 files and i want to take different fields from each file and combine them in one. I would like to ask if somebody tell me how can I refer to each field of the different files to write an awk command. I mean can I do sth like awk '........... print $1.file1 $3.file2}'... (1 Reply)
Discussion started by: sickboy
1 Replies

2. Shell Programming and Scripting

Sed Awk Cut Grep Combination Help ?

I have been reading for a few hours trying to educate myself enough to accomplish this task, so please know I have performed some research. Unfortunately, I am not a *NIX scripting expert, or a coder. I come from a network background instead. SO, here is my desired outcome. I have some Cisco... (5 Replies)
Discussion started by: abbzer0
5 Replies

3. Shell Programming and Scripting

awk split and rename files

I have a file test1.html like below: <dctm_topnav_en_US> <html> ..... </html> <dctm_topnav_en_CA> <html> ..... </html> <dctm_topnav_en_FR> <html> ..... </html> I need to use awk to split this into three file names like en_US.html , en_CA.html, en_FR.html each having content between... (4 Replies)
Discussion started by: vijay52
4 Replies

4. Shell Programming and Scripting

Using a combination of sort/cut/grep/awk/join/paste/sed

I have a file and need to only select users that have a shell of “/bin/bash” in the line using awk or sed please help (4 Replies)
Discussion started by: boyboy1212
4 Replies

5. Shell Programming and Scripting

help with awk for file combination

1)file1: | *Local Communication Bandwidths (MB/Sec) | Memory copy (bcopy) | | ^ | mmap_bandwidth | | ^ | mmap_read bandwidth | | ^ | memory write bandwidth | | Local Communication Latencies | Pipe Latency | 2)file2 422.6903 1948.9000 ... (9 Replies)
Discussion started by: yanglei_fage
9 Replies

6. Shell Programming and Scripting

Rename file using sed or awk

I have a filename like 1_DATE_3_4.5_888 and I want to modify the date field (ie the last 4 digits ) alone and remove the last field. Old filename:1_DATE_3_4.5_888 Given date (for eg):120606259532 modified date:120606259899 new filename:1_<modified date>_3.4.5 (14 Replies)
Discussion started by: sandy88
14 Replies

7. Shell Programming and Scripting

Considerable trouble with for loop in combination with awk

I have the text file where each line has the format: chr10 101418889 101418904 0.816327 Right now the interval between column 2 and 3 is 15. I only want the two consecutive positions starting at position 1, write it to a file, then move up one position write to file etc. So that: ... (1 Reply)
Discussion started by: jfern
1 Replies

8. Shell Programming and Scripting

awk and rename ?

I have a log file from /m/n/o/A.log with 1 line current content: 19518634,SW,windows_x86_64 and an folder from /x/y/z/testit_folder How do you write a shell script to rename test_folder to changed_monthdate_19518634 If today is 04/23 the name should be changed_0423_19518634 Thanks for your... (1 Reply)
Discussion started by: sabercats
1 Replies

9. Shell Programming and Scripting

awk to count and rename based on fields

In the below awk using the tab-delimited input, I am trying count the - symbol in $5 and output the count as well as the renamed condition ins. I am also count the - symbol in $6 and output the count as well as the renamed condition del. I am also count the tomes that in $5 and $6 there are... (6 Replies)
Discussion started by: cmccabe
6 Replies

10. Shell Programming and Scripting

awk or a combination of commands to read and calculate nth lines from pattern

Two numerical lines, found by either header line, need to be added and the total placed in a new-header section. Also the total should should be rounded or cut to a two decimal anynumber.XX format with the AB string added on the end. For example: The numerical lines from headers 2 and 3 are... (3 Replies)
Discussion started by: jessandr
3 Replies
PDFCONCAT(1)						      General Commands Manual						      PDFCONCAT(1)

NAME
pdfconcat - program to concatenate several PDF files. SYNOPSIS
pdfconcat -o outfile.pdf input1.pdf [inputN.pdf ...] DESCRIPTION
This manual page documents briefly the pdfconcat command. pdfconcat is a small and fast command-line utility written in ANSI C that can concatenate (merge) several PDF files into a long PDF docu- ment. External libraries are not required, only ANSI C functions are used. Several features of the output file are taken from the first input file only. For example, outlines (also known as hierarchical bookmarks) in subsequent input files are ignored. pdfconcat compresses its input a little bit by removing whitespace and unused file parts. This program has been tested on various huge PDFs downloaded from the Adobe web site, plus an 1200-pages long mathematics manual typeset by LaTeX, emitted by pdflatex, dvipdfm and `gs -sDEVICE=pdfwrite', totalling 5981 pages in a single PDF file. OPTIONS
-o output.pdf Place output in file output.pdf SEE ALSO
imgmerge(1), xpaint(1). AUTHOR
pdfconcat was written by Peter Szabo <pts@fazekas.hu>. This manual page was written by Josue Abarca <jmaslibre@debian.org.gt>, for the Debian project (and may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation please see /usr/share/common-licenses/GPL-2 for the full text of the licence. January 22, 2010 PDFCONCAT(1)
All times are GMT -4. The time now is 12:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy