08-25-2009
Reddy,
Can You pls. post sample input and output your expecting .
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have learned file comparison from my previous post here. Then, it is comparing the whole line. Now, i have a new problem.
I have two files with 3 columns separated with a "|". What i want to do is to compare the second and third column of file 1, and the second and third column of file 2. And... (4 Replies)
Discussion started by: kingpeejay
4 Replies
2. Shell Programming and Scripting
I am trying to print 1st, 2nd, 13th and 14th fields of a file of line numbers from 29 to 10029. I dont know how to put this in one code. Currently I am removing the selected lines by
awk 'NR==29,NR==10029' File1 > File2
and then doing
awk '{print $1, $2, $13, $14}' File2 > File3
Can... (3 Replies)
Discussion started by: ananyob
3 Replies
3. Shell Programming and Scripting
Hello,
I have the following piece of code:
roleName
=`cat $inputFile | awk -F';' '{ print $1 }'`
roleDescription
=`cat $inputFile | awk -F';' '{ print $2 }'`
roleAuthProfile
=`cat $inputFile | awk -F';' '{ print $3 }'`
mappedUserID (5 Replies)
Discussion started by: pr0tocoldan
5 Replies
4. Shell Programming and Scripting
this works:
cat file.txt| awk 'NR==45,NR==55'
but how do I assign variables instead of numbers:
this does not work:
cat file.txt | awk 'NR==$start,NR==$end'
there need variables instead of numbers
Sorry for my English
Thank you for answer (3 Replies)
Discussion started by: gizmo16
3 Replies
5. Shell Programming and Scripting
hi guys,
i have the following problem: i have a matrix with 3 columns and over 450 rows like this:
0.0165 0.0151 0.0230
0.0143 0.0153 0.0134
0.0135 0.0123 0.0195
0.0173 0.0153 0.0182
i now want to calculate the average of every line and divide every element of this... (1 Reply)
Discussion started by: waddle
1 Replies
6. Shell Programming and Scripting
Is it possible to print max number of 2 columns - awk
note: print max if the integer is positive and print min if the integer is negative
input
a 1 2
b 3 4
c 5 1
d -3 -5
d -5 -3
output
a 2
b 4
c 5
d -5
d -5 (4 Replies)
Discussion started by: quincyjones
4 Replies
7. Shell Programming and Scripting
Greetings!
I have been trying to find out a way to take a CSV file with a large number of rows, and a very large number of columns (in the thousands) and convert the rows to a single column of data, where the first row is a header representing the attribute name and the subsequent series of... (3 Replies)
Discussion started by: tntelle
3 Replies
8. Shell Programming and Scripting
Hi.
How can we print those rows of file2 which are mentioned in file1. first character of file1 is a row number.. for eg
file1
1:abc
3:ghi
6:pqr
file2
a abc
b def
c ghi
d jkl
e mno
f pqr
... (6 Replies)
Discussion started by: Abhiraj Singh
6 Replies
9. Shell Programming and Scripting
Hello,
I have often found bash to be difficult when it comes to floating point numbers. I have data with rows of tab delimited floating point numbers. I need to find the smallest number in each row that is not 0.0. Numbers can be negative and they do not come in any particular order for a given... (9 Replies)
Discussion started by: LMHmedchem
9 Replies
10. Shell Programming and Scripting
I want to split this with every 5 or 50 depend on how much data the file will have. And remove the comma on the end
Source file will have
001,0002,0003,004,005,0006,0007,007A,007B,007C,007E,007F,008A,008C
Need Output from every 5 tab and remove the comma from end of each row
... (4 Replies)
Discussion started by: ranjancom2000
4 Replies
FAPG(1) User Manuals FAPG(1)
NAME
fapg - Fast Audio Playlist Generator
SYNOPSIS
fapg [ options ] /path/to/mp3/dir1 [ /path/to/mp3/dir2 ... ]
DESCRIPTION
fapg is a tool to generate list of audio files (Wav, MP2, MP3, Ogg, etc) in various formats (M3U, PLS, XSPF, HTML, RSS, etc). It is very
useful if you have a large amount of audio files and you want to quickly and frequently build a playlist.
It is coded in C to be as fast as possible, and does not use any specific audio library (like ID3Lib). This allow you to deploy it faster
and easier, and to have better performances since the less informations are loaded. On the other hand, this tool is not (yet) compatible
with all the known formats.
OPTIONS
-b|--backslash
Replace the '/' with '' in Unix path.
-d|--debug
Display useful messages if the program fails ;)
-f|--format=m3u|pls|xspf|html|rss|pla|txx
Choose which format of playlist you want to generate (default is m3u).
-g|--genre=#:#:...
Choose which genres (numerical values only) will be included in the generated playlist (default is all).
-n|--nohardlink
Avoid to parse twice the files because of hardlinks.
-o|--output=/path/to/file.m3u
Choose the name of the playlist file to generate (default behavior is to display on standard output).
-p|--prefix=/the/prefix
Replace the Unix path with another string (useful to give a Samba path for example).
-r|--recursive
Recursively read the subdirectories.
-w|--windows
Replace all Unix characters with Windows characters.
-x|--exclude=#:#:...
Choose which genres (numerical values only) will be excluded in the generated playlist (default is none).
-c|--command=<intern|...>
External binary or script that produces additional fields for RSS feeds (slow).
-s|--stdin
Read filenames and/or directories from standard input instead of command line.
EXAMPLES
Generate a PLS playlist for an album: fapg --format=pls --output=~/path/to/album/list.pls ~/path/to/album
You have a file server using Samba which shares a large amount of audio files for Windows powered computers using Winamp. The directory on
the server containing the files is /samba/mp3 and is visible on the Windows network as \servermp3 : cd /samba/mp3 && fapg --backslash
--output=/samba/mp3/list.m3u --prefix='\servermp3' --recursive --windows ./
An HTML playlist for an album: fapg --output=fapg.html ~/path/to/album
A playlist that contains all your classical tracks may receive the genres to include (or exclude) in one or multiple portions fapg
--genre=32:105 --genre=106:104:103 /path/to/all/music
Generate a podcasting XML file using an external program rss.sh to generate a detailed description: fapg --output=dir.xml -f rss -c
/usr/local/bin/rss.sh -r --prefix=http://thisserver/basedir path/to/mp3
Generate a playlist that will work on a Sansa e200 series MP3 player: fapg -f pla -o /path/to/playlist.pla /path/to/all/music
if command starts with intern the build-in description (Author,Title,Link) is generated. Please note that in all given directories ( and
in ...basedir/xml ) files called podcast.jpg are referenced. Many header fields are set to defaults using environment variables like LOG-
NAME or LANG.
AUTHOR
Antoine Jacquet <royale@zerezo.com>, http://royale.zerezo.com/fapg/. Manpage by Thomas Kappler <thomas.kappler@stud.uni-karlsruhe.de>.
Linux JANUARY 2007 FAPG(1)