10-23-2006
I don't know if I understand what you want, but couldn't you use the -q (quiet) option to suppress writing to stdout?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to set up a variable based on the name of the file.
function script_name {
if
then
job_name='MONITOR'
return job_name;
elsif
then
job_name='VERSION'
return job_name
fi
}
for i in `ls *log`
do
script_name $i
done. (4 Replies)
Discussion started by: oracle8
4 Replies
2. Shell Programming and Scripting
Hi i am using a shell script for renaming the files and placing in the remote location(FTP) my code is:
cd $1
day=$(date +%d)
for i in `ls -1 BBW*`
do
last=`tail -1 $i`
pat=`expr "$last" : '.*(\(.*\)).*'`
pat=`echo $pat | sed 's/ /_/'`
pat=$pat$day
mv $i $pat
rm -f $day
done... (3 Replies)
Discussion started by: srivsn
3 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I will pass 3 parameters for a script.I have to check the file name and create a new file name with time stamp.
the parameters which i'm passing are
/dir/stg/filename.txt
/dir/path/head.txt
/dir/path/tail.txt
Now i have to check filename like :
if it is a.txt i have to create... (2 Replies)
Discussion started by: ammu
2 Replies
4. Shell Programming and Scripting
Does anyone know the quick way to check if the variable contains only numeric characters, for example:
A=123445 - correct
B=#f123* - incorrect
I am in ksh88i Thanks a lot for help -A (1 Reply)
Discussion started by: aoussenko
1 Replies
5. Shell Programming and Scripting
I have a ksh script and would like to validate a MAC address that is input by the user:
00:14:4F:FC:00:49
example:
MAC=`/usr/bin/ckint -p "Enter MAC address"`
echo $MAC
echo " "
Obviously chkint will not work, but does anyone have any suggestions?
Thanks (9 Replies)
Discussion started by: hxman
9 Replies
6. Shell Programming and Scripting
Hi All,
I have a file that has ~2.9Millions lines with 32 columns respectively.
The columns numbers 23,27 are the primary Keys for the file.
The fields are delimited by TAB.
I need to check the condition If
Column number: 20 is NOT NULL
Column number: 21 is not 0
Column number: 22 is... (7 Replies)
Discussion started by: filter
7 Replies
7. Shell Programming and Scripting
File contian below data...
20111101
20111102
20111131
I am new to unix and per scirpt...
First two records are valid and last record is invalid,how to get the valid records...
Please help me unix or perl script.
:wall:
Thanks,
Murali (5 Replies)
Discussion started by: muralikri
5 Replies
8. Shell Programming and Scripting
Hi,
I have a file abc.txt as
ABC,TYU,1.2566
AHG,GJJ,1.898
hgh,FGA,1.854
My program is reading each line and storing the values variables base_cy, quo_cy, ra_amt
Need to validate each of them as in:
base_cy and quo_cy should be a 3 character alphabet among A-Z, if it is lower case ... (1 Reply)
Discussion started by: infyanurag
1 Replies
9. Shell Programming and Scripting
I need a script that should print 'yes' if the argument is a valid shell variable name else 'No' if it is not a valid shell variable. A valid one begins with an alphabet or percentage (%) character and is followed by zero or more alphanumberic or percentage (%) characters.
For example:
$... (6 Replies)
Discussion started by: pingiliarjun
6 Replies
10. SCO
Hello
I am analyzing disk performance OSR5.0.7 running inside VirtualBox.
GUEST: osr5.0.7; 1GB ram; raw disk
HOST: SLES11SP3, 4GB ram; 1 disc SATA2-7200rpm
But I'm not sure how to do it right (the values returned by sar not match the values of the physical machine)
The attributes... (0 Replies)
Discussion started by: flako
0 Replies
XZDEC(1) XZ Utils XZDEC(1)
NAME
xzdec, lzmadec - Small .xz and .lzma decompressors
SYNOPSIS
xzdec [option]... [file]...
lzmadec [option]... [file]...
DESCRIPTION
xzdec is a liblzma-based decompression-only tool for .xz (and only .xz) files. xzdec is intended to work as a drop-in replacement for
xz(1) in the most common situations where a script has been written to use xz --decompress --stdout (and possibly a few other commonly used
options) to decompress .xz files. lzmadec is identical to xzdec except that lzmadec supports .lzma files instead of .xz files.
To reduce the size of the executable, xzdec doesn't support multithreading or localization, and doesn't read options from XZ_DEFAULTS and
XZ_OPT environment variables. xzdec doesn't support displaying intermediate progress information: sending SIGINFO to xzdec does nothing,
but sending SIGUSR1 terminates the process instead of displaying progress information.
OPTIONS
-d, --decompress, --uncompress
Ignored for xz(1) compatibility. xzdec supports only decompression.
-k, --keep
Ignored for xz(1) compatibility. xzdec never creates or removes any files.
-c, --stdout, --to-stdout
Ignored for xz(1) compatibility. xzdec always writes the decompressed data to standard output.
-q, --quiet
Specifying this once does nothing since xzdec never displays any warnings or notices. Specify this twice to suppress errors.
-Q, --no-warn
Ignored for xz(1) compatibility. xzdec never uses the exit status 2.
-h, --help
Display a help message and exit successfully.
-V, --version
Display the version number of xzdec and liblzma.
EXIT STATUS
0 All was good.
1 An error occurred.
xzdec doesn't have any warning messages like xz(1) has, thus the exit status 2 is not used by xzdec.
NOTES
Use xz(1) instead of xzdec or lzmadec for normal everyday use. xzdec or lzmadec are meant only for situations where it is important to
have a smaller decompressor than the full-featured xz(1).
xzdec and lzmadec are not really that small. The size can be reduced further by dropping features from liblzma at compile time, but that
shouldn't usually be done for executables distributed in typical non-embedded operating system distributions. If you need a truly small
.xz decompressor, consider using XZ Embedded.
SEE ALSO
xz(1)
XZ Embedded: <http://tukaani.org/xz/embedded.html>
Tukaani 2010-09-27 XZDEC(1)