10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How to run a script/command on all the directories in a directory tree?
The below script is just for the files in a single directory, how to run it on all the directories in a directory tree?
#!/bin/sh
for audio_files in *.mp3
do
outfile="${audio_files%.*}.aiff"
sox "$audio_files"... (2 Replies)
Discussion started by: temp-usr
2 Replies
2. UNIX for Dummies Questions & Answers
Hi,
when I run tree command in linux box getting below image, not the line
test
âââ lost+found
âââ test1
â  âââ aaa.txt
â  âââ bbb.txt
âââ test2
3 directories, 2 files
installed tree-1.5.3-2.el6.x86_64 package (8 Replies)
Discussion started by: stew
8 Replies
3. Shell Programming and Scripting
Hope the title is close enough; didn't quite know how to put this...
OK.
We have a hypothetical script, script.a, with one simplistic line:bash ./nextDir/script.bNow script.b has a bit more going for it; and does file moves, copies, and renames, calling all the targets with respect to itself.... (7 Replies)
Discussion started by: LinQ
7 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
Can any guru please help on how I can tweak the following ps command so that it only shows the lines that I wanted.
$ command ps -HAcl -F S -A f
F S UID PID PPID CLS PRI ADDR SZ WCHAN RSS PSR STIME TTY TIME CMD
4 S root 1 0 TS 24 - 2592 ? ... (3 Replies)
Discussion started by: newbie_01
3 Replies
5. Shell Programming and Scripting
Hi, I have this command:
ls -R | grep ":$" | sed -e 's/:$//' -e 's/*\//--/g' -e 's/^/ /' -e 's/-/|/' Works nicely to show the current file structure as a tree.
I'd like to have it as an alias in '' but doesn't work just like that and I can't fix it with backslashes:
alias tree='?'
... (4 Replies)
Discussion started by: borobudur
4 Replies
6. UNIX for Dummies Questions & Answers
what's the relationship among locale, glibc, charset, charmap and fonts?
why locale needs to be generated by glibc? how?
what are in the locale-archive file?
and what are in font files? (0 Replies)
Discussion started by: vistastar
0 Replies
7. UNIX for Dummies Questions & Answers
How can i install tree command in ubundu without root ? I have found some shell script which does the same job as tree but i would like to get all the options in tree command
thanks (2 Replies)
Discussion started by: gvj
2 Replies
8. Solaris
Is there a command that displays a certain path of files in a tree just like the dos command 'tree'? (17 Replies)
Discussion started by: Bradj47
17 Replies
9. UNIX for Advanced & Expert Users
Hi,
How can I find out the charset on a Unix server (SUNOS 5.2)? I tried locale charmap and returned 646. What does 646 mean? If I send an xml file with encoding="utf-8", should the server be able to handle the file, even with special characters in it?
Thanks. (0 Replies)
Discussion started by: iengca
0 Replies
10. UNIX for Dummies Questions & Answers
In DOS, to get the complete directory structure, we use 'TREE' command..
can anyone tell me what is the equivalent command in Unix
I am using
SunOS ABC 5.8 Generic_117350-18 sun4u sparc SUNW,Sun-Fire-V240
thanks.. (1 Reply)
Discussion started by: wip_vasikaran
1 Replies
fileutil::magic::cgen(n) file utilities fileutil::magic::cgen(n)
__________________________________________________________________________________________________________________________________________________
NAME
fileutil::magic::cgen - Generator core for compiler of magic(5) files
SYNOPSIS
package require Tcl 8.4
package require fileutil::magic::cgen ?1.0?
package require fileutil::magic::rt ?1.0?
package require struct::tree
package require struct::list
::fileutil::magic::cgen::2tree script
::fileutil::magic::cgen::treedump tree
::fileutil::magic::cgen::treegen tree node
_________________________________________________________________
DESCRIPTION
This package provides the generator backend for a compiler of magic(5) files into recognizers based on the fileutil::magic::rt recognizer
runtime package. For the compiler frontend using this generator see the package fileutil::magic::cfront.
COMMANDS
::fileutil::magic::cgen::2tree script
This command converts the recognizer specified by the script into a tree and returns the object command of that tree as its result.
It uses the package struct::tree for the tree.
The script is in the format specified by magic(5).
::fileutil::magic::cgen::treedump tree
This command takes a tree as generated by ::fileutil::magic::cgen::2tree and returns a string encoding the tree for human consump-
tion, to aid in debugging.
::fileutil::magic::cgen::treegen tree node
This command takes a tree as generated by ::fileutil::magic::cgen::2tree and returns a Tcl script, the recognizer for the file types
represented by the sub-tree rooted at the node. The generated script makes extensive use of the commands provided by the recognizer
runtime package fileutil::magic::rt to perform its duties.
BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category fileutil
:: magic of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may
have for either package and/or documentation.
SEE ALSO
file(1), fileutil, magic(5)
KEYWORDS
file recognition, file type, file utilities, mime, type
CATEGORY
Programming tools
fumagic 1.0 fileutil::magic::cgen(n)