I have a file in which I need to search if a new line character exists on the last line in the file. Please let me know how can I achieve it using Unix commands? (10 Replies)
Hi Sorry to multipost. I am opening the new thread because the earlier threads head was misleading to my current doubt.
and i am stuck.
list=`cat /u/Test/programs`;
psg "ServTest" | awk -v listawk=$list '{
cmd_name=($5 ~ /^/)? $9:$8
for(pgmname in listawk)
... (6 Replies)
Hi Experts,
I have data coming in 4 columns and there are new line characters \n in between the data. I need to remove the new line characters in the middle of the row and keep the \n character at the end of the line.
File is comma (,) seperated.
Eg:
ID,Client ,SNo,Rank
37,Airtel \n... (8 Replies)
I get a file which has all its content in a single row.
The file contains xml data containing 3000 records, but all in a single row, making it difficult for Unix to Process the file.
I decided to insert a new line character at all occurrences of a particular string in this file (say replacing... (4 Replies)
Hi Guys
When I run the below command
ssh -o 'PasswordAuthentication yes' -o 'PreferredAuthentications publickey' -i $HOME/.ssh/id_dsa Server_Name
I found the below error
ommand-line line 0: Missing yes/no argument
Kindly help me to sort out
Double post, continued... (0 Replies)
I have several hundreds of tiny files which need to be concatenated into one single line and all those in a single file. Some files have several blank lines. Tried to use this script but failed on it.
awk 'END { print r } r && !/^/ { print FILENAME, r; r = "" }{ r = r ? r $0 : $0 }' *.txt... (8 Replies)
Hi ,
I am doing some enhancements in an existing shell script. There it used the awk command in a function as below :
float_expr() {
IFS=" " command eval 'awk "
BEGIN {
result = $*
print result
exit(result == 0)
}"'
}
It calls the function float_expr to evaluate two values ,... (1 Reply)
I have a script that builds a database ~30 million lines, ~3.7 GB .cvs file. After multiple optimzations It takes about 62 min to bring in and parse all the files and used to take 10 min to remove duplicates until I was requested to add another column. I am using the highly optimized awk code:
awk... (34 Replies)
Hi there,
I was using the following awk statement but the first line is missing
dirlist=(`ls summary*`); #list all the files in a directory and store them into a variable
echo '<table border='1'>'
echo '<tr><td>%windir%\fonts\*.* </td><td>' ; awk '/Successfully/ {P=0} P... (2 Replies)
My file (the output of an experiment) starts off looking like this,
_____________________________________________________________
Subjects incorporated to date: 001
Data file started on machine PKSHS260-05CP
**********************************************************************
Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
LEARN ABOUT DEBIAN
vipsthumbnail
VIPSTHUMBNAIL(1) General Commands Manual VIPSTHUMBNAIL(1)NAME
vipsthumbnail - make thumbnails of image files
SYNOPSIS
vipsthumbnail [flags] imagefile1 imagefile2 ...
DESCRIPTION vipsthumbnail(1) processes each imagefile in turn, shrinking each image to fit within a 128 by 128 pixel square. The shrunk image is writ-
ten to a new file named tn_imagefile.jpg. This program is typically faster and uses less memory than other image thumbnail programs.
For example:
$ vipsthumbnail fred.png jim.tif
will read image files fred.png and jim.tif and write thumbnails to the files tn_fred.jpg and tn_jim.jpg.
$ vipsthumbnail --size=64 -o thumbnails/%s.png fred.jpg
will read image file fred.jpg and write a 64 x 64 pixel thumbnail to the file thumbnails/fred.png.
On Unix machines, vips will create temporary files in "/tmp" by default. Use the environment variable TMPDIR to change this location. On
Windows, vips uses GetTempPath() to pick a location, see the MS documentation.
Use the --vips-disc-threshold command-line switch, or the IM_DISC_THRESHOLD environment variable, to make vipsthumbnail use memory rather
than temporary files.
OPTIONS -s N, --size=N
Set the output thumbnail size to N x N pixels. The image is shrunk so that it just fits within this area, Images which are smaller
than this are expanded.
-o FORMAT, --output=FORMAT
Set the output format string. The input filename has any file type suffix removed, then that value is substitued into FORMAT replac-
ing %s. The default value is tn_%s.jpg meaning JPEG output, with tn_ prepended. You can add format options too, for example
tn_%s.jpg:20 will write JPEG images with Q set to 20.
-p I, --interpolator=I
Resample with interpolator I. Use vips --list classes to see a list of valid interpolators. The default is bilinear.
-n, --nosharpen
By default, vipsthumbnail(1) will sharpen thumbnails slightly to make them look more pleasing. This option disables this sharpening.
-e PROFILE, --eprofile=PROFILE
Export thumbnails with this ICC profile. Images are only colour-transformed if there is both an output and an input profile avail-
able. The input profile can either be embedded in the input image or supplied with the --iprofile option.
-i PROFILE, --iprofile=PROFILE
Import images with this ICC profile, if no profile is embdedded in the image. Images are only colour-transformed if there is both
an output and an input profile available. The output profile should be supplied with the --oprofile option.
-l, --nodelete
Don't delete the profile from the output image. Since all output images will generally have the same profile, vipsthumbnail(1) will
usually delete it. This option leaves the profile inside the image.
-v, --verbose
vipsthumbnail(1) normally runs silently, except for warning and error messages. This option makes it print a list of the operations
it performs on each image.
RETURN VALUE
returns 0 on success and non-zero on error.
SEE ALSO header(1)
13 May 2010 VIPSTHUMBNAIL(1)