09-03-2007
append blank space
Hi,
I would like to add blank space for fixed length(50) if length of string <30.
Scenario:
File Size
AAA.CSV 123
BB.CSV 134
Expected:
File Size
AAA.CSV 123
BB.CSV 134
I want append blank space until 30 character.
Thanks and Regards,
HAA
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I write a script with register and login user.
So, i encrypt password with
encryptedpass=`perl -e "print crypt("${mypass}",salt)"`
if password do not contain blank space, it work
but if password have blank space, it cause error in that line
the error is:
syntax error at -e .....
Anyone... (3 Replies)
Discussion started by: WuZun
3 Replies
2. Shell Programming and Scripting
Hello,
I am using this to get only directories :
ls -l | grep '^d'and here is the result :
drwx------ 13 so_nic sonic 13 Nov 4 13:03 GLARY
drwx------ 3 so_nic sonic 3 May 6 2010 PSY2R
drwx------ 15 so_nic sonic 15 Oct 14 08:47 PSYR1
But I only need to keep this... (7 Replies)
Discussion started by: Aswex
7 Replies
3. Shell Programming and Scripting
Dear Masters,
Need your help for this small query.
I am trying to get all the strings that starts with a blank space as output.
Limitation is , it should be done only through AWK.
Input will be:
aa
_1bbb
c-ccc
ddd
eeeee
ff
Output should be:
_1bbb
c-ccc
eeee
ff (5 Replies)
Discussion started by: patric2326
5 Replies
4. Shell Programming and Scripting
Dear All-
Please suggest a single unix command which can append blank line in multiple files.
I need to achieve this using a single unix command and not a script
Please do advice
Regards,
Suresh (2 Replies)
Discussion started by: sureshg_sampat
2 Replies
5. UNIX for Dummies Questions & Answers
hi everyone,
i have a problem in unix script , i need to remove line that has blank , not blank line .
example: mahm,,jdggkhsd,ghskj,,fshjkl
can anyone help? (4 Replies)
Discussion started by: Reham.Donia
4 Replies
6. Shell Programming and Scripting
Hello, could you please help with this one. I have an input file like this:
123,4567,89000
123456789,9876543,12
and for the output I need strings to be with the fixed length, let's say 15, and if the string is -lt 15 to be populated with blanks at the end until it reach 15, like this:
123 ,4567... (1 Reply)
Discussion started by: apenkov
1 Replies
7. Shell Programming and Scripting
TT0000013101257
|
JCJMMUJMMUB018 ... (0 Replies)
Discussion started by: sususa
0 Replies
8. Shell Programming and Scripting
I have a file say ADCD which is like following-->
Please consider 'z' as space
#cat ADCD
<!--Yzzz|z-->
<!--Nzzzzz-->
Now I want to store the content of this file to a variable say VAR like this-->
#VAR=`cat ADCD`
#echo $VAR
<!--Yz|z--> <!--Nz-->
Now I don' t want the variable... (2 Replies)
Discussion started by: muchyog
2 Replies
9. Shell Programming and Scripting
Hi everyone, i need to "grep" a file with a string with space blanks, like this:
grep "XXXX XX" file.txt
The problem, i need put the "XXXX XX" in a string variable. When the script executes the grep, do:
gresp XXXX XX file.txt
How can i solve this problem?
The... (5 Replies)
Discussion started by: Xedrox
5 Replies
10. Shell Programming and Scripting
Hi,
How to remove blank spaces using vi (I am using AIX)?
#cat siva.txt
AAA BBB
CCC DDD
EEE FFF
Need to remove space between 2 columns.
Regards,
Siva (7 Replies)
Discussion started by: ksgnathan
7 Replies
LEARN ABOUT DEBIAN
exifcom
EXIFCOM(1) General Commands Manual EXIFCOM(1)
NAME
exifcom - display or set the UserComment tag contained in a JPEG Exif section
SYNOPSIS
exifcom [ -bfinv ] [ -w comment ] [ -s delim ] file ...
DESCRIPTION
When invoked without arguments, the exifcom utility displays the contents of the Exif UserComment tag contained in file to the standard
output. Otherwise, depending on the options specified, exifcom will blank the tag or set it to comment.
Some digital cameras include a standard UserComment tag in the Exif data added to the image files they produce. This comment tag is fixed-
length and supports multi-byte character sets (though exifcom does not). Note that not all cameras will include the tag.
The utility is conservative in its approach to writing the UserComment tag. It does not modify, extend, or otherwise adulterate an image's
Exif metadata structure. When writing the tag it merely changes pre-allocated bytes. Therefore, exifcom is at the mercy of the Exif data
creator for both the presence of the tag and its length. It cannot create a UserComment tag when the camera does not include one, nor can
it write a comment longer than the space pre-allocated by the camera. exifcom only displays and writes ASCII character set comments.
OPTIONS
-b Blank the UserComment tag, overwriting both the character code and comment fields with NUL. The character code specifies how the
comment is represented; it is "undefined" when blank. This is the state to which many cameras initialize the tag. When used in
conjunction with the -w option, exifcom will blank the comment prior to setting it to comment.
-f Overwrite or blank existing or unsupported comments without prompting for confirmation.
-i Write a prompt to standard error before overwriting or blanking an existing or unsupported comment. If the response from the stan-
dard input begins with 'y' or 'Y', the comment is overwritten. This option is default behavior.
-n Do not overwrite or blank existing or unsupported comments and do not prompt for confirmation (i.e., automatically answer 'no' to a
confirmation prompt). This option takes precedence over both the -f and -i options.
-s Separate field name and value in the verbose and multiple file cases with the string delim. The default is ': '.
-v Be verbose when printing the contents of the UserComment tag. Besides the comment itself (if present and supported), exifcom will
display the maximum comment length supported, the character code of the comment, and the length of the comment.
-w Set UserComment to the ASCII string comment. If comment is longer than what the tag supports, it will be truncated to fit.
DIAGNOSTICS
The exifcom utility exits 0 on success. When displaying a comment from a single file, if the UserComment tag is missing, it exits 1; if
blank, it exits 2; if in an unsupported character code, it exits 3. Otherwise, it exits 1 if an error occurs.
SEE ALSO
exiftags(1), exiftime(1)
STANDARDS
The exifcom utility was developed using the January 2002 Exif standard, version 2.2 (http://tsc.jeita.or.jp/).
BUGS
If the tag doesn't exist or is too short, too bad.
AUTHOR
The exifcom utility and this man page were written by Eric M. Johnston <emj@postal.net>.
EXIFCOM(1)