Sponsored Content
Top Forums Shell Programming and Scripting Make the first character uppercase Post 302472795 by birei on Thursday 18th of November 2010 06:03:45 AM
Old 11-18-2010
Hi,
Code:
$ perl -ne 'print ucfirst' infile

Regards,
Birei
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How To Make Decimal Point Fall On The 15th Character On The Screen

If i have a variable which is a decimal number, i.e 34.05 How can you make decimal point fall on the 15th character on the screen? Or any other that you can specify? Can you do it using sed or awk? (3 Replies)
Discussion started by: Vozx
3 Replies

2. UNIX for Dummies Questions & Answers

make uppercase

If in a script I am taking an input (R201) for example and assigning it to a variable, how would I change the R to uppercase if it was keyed in as r201? I can't seem to get it to work with toupper (4 Replies)
Discussion started by: kirkm76
4 Replies

3. Shell Programming and Scripting

only uppercase first character?

should be a simple question, I am trying to uppercase every first character in a word on the list. abc google cnn services My first thought was sed 'y/^/^/', but it changed all the characters, not just the first character. any thoughts? (7 Replies)
Discussion started by: fedora
7 Replies

4. UNIX for Dummies Questions & Answers

make script treat * as a regular character

I need a script that reads the out put of a command (softwareupdate --list) and will tally up the number of asterisks in the output and tell me how many there were. How do I go about getting my script to treat asterisks as a regular character and not a wildcard or some other operator? (8 Replies)
Discussion started by: glev2005
8 Replies

5. Shell Programming and Scripting

Uppercase/lowercase comparison of one character per line with awk??

Another frustrating scripting problem from a biologist trying to manipulate a file with several millions line. For each of the line I need to compare the uppercase A or C or G or T with the lowercase a or c or g or t. If there are more uppercases, a + should be added to a new column, otherwise a -... (10 Replies)
Discussion started by: ivpz
10 Replies

6. Shell Programming and Scripting

Make pwd print escape character

I decided I wanted to have the cd command print my full working directory after each cd command, so I put this cw command in .bashrc as a function. cw () { cd "${1}" pwd }While this works I would like pwd to print escapes when a space in a directory name exists. This would... (7 Replies)
Discussion started by: jelloir
7 Replies

7. Shell Programming and Scripting

making the first character of word using uppercase using awk and sed

I want to make the first character of some words to be uppercase. I have a file like the one below. uid,givenname,sn,cn,mail,telephonenumber mattj,matt,johnson,matt johnson,mattj@gmail.com markv,mark,vennet,matt s vennet,markv@gmail.com mikea,mike,austi,mike austin,mike@gmail.com I want... (3 Replies)
Discussion started by: matt12
3 Replies

8. AIX

Bison -pap_expr_yy invalid character:% unexpected "identifier" while running make for Apache2.4.3 64

The Follwing packages are installed on my AIX 6.1 box gcc-4.7.2-1 gcc-c++-4.7.2-1 gcc-cpp-4.7.2-1 gcc-gfortran-4.7.2-1 libgcc-4.7.2-1 libgomp-4.7.2-1 libstdc++-4.7.2-1 libstdc++-devel-4.7.2-1 gmp-5.0.5-1 libmpc-1.0.1-2 libmpc-devel-1.0.1-2 libmpcdec-1.2.6-1 libmpcdec-devel-1.2.6-1... (0 Replies)
Discussion started by: Ashish Gupta
0 Replies

9. Shell Programming and Scripting

Add character to specific columns using sed or awk and make it a permanent change

Hi, I am writing a shell script where I want that # should be added in all those lines as the first character where the pattern matches. file has lot of functions defined a.sh #!/bin/bash fn a { beautiful evening sunny day } fn b { } fn c { hello world .its a beautiful day ... (12 Replies)
Discussion started by: ashima jain
12 Replies

10. Shell Programming and Scripting

Cannot find correct syntax to make file name uppercase letters

I have a file name : var=UsrAccChgRpt I want to make them upper case. Tried: $var | tr Error: tr: Invalid combination of options and Strings. Usage: tr | -ds | -s | -ds | -s ] String1 String2 tr { -d | -s | -d | -s } String1 Could you please help. I am using AIX... (2 Replies)
Discussion started by: digioleg54
2 Replies
MINCCOMPLETE(1) 					User Contributed Perl Documentation					   MINCCOMPLETE(1)

NAME
minccomplete - checks if a MINC file is complete SYNOPSIS
minccomplete [options] <file.mnc> minccomplete is designed as a QC tool that you can use to check if MINC or xfm files have been completely written. DESCRIPTION
minccomplete will check if a file exists and is completely written. The reasons for non-completion are varied but typically caused when a process writing a MINC or xfm file is interrupted. A zero will be returned if the file is complete and a -1 if it isn't. Examples: $ minccomplete in.mnc 0 $ minccomplete in.xfm 0 A MINC file is returned as complete if the image attribute image:complete is set. ie: mincinfo -attvalue image:complete infile.mnc A xfm file is deemed complete if xfm2param can parse the file. The associated exit codes will also be set as part of this so that minccomplete can be used in scripts. An entirely simplistic example: #! /bin/sh infile=$1 if [ `minccomplete ${infile}` ] then echo "Yes!" else echo "Nope, try again" fi Problems or comments should be sent to: a.janke@gmail.com OPTIONS
-v, --verbose Be noisy when doing things --version Print version number and exit -h, --help Dump some quick help output --man Dump a man page -e, --error_string Don't die on errors (eg: file not found) and print the supplied value instead SEE ALSO
mincheader(1) mincinfo(1) xfm2param(1) AUTHOR
Andrew Janke - a.janke@gmail.com COPYRIGHTS
Copyright 2000 by Andrew L Janke perl v5.14.2 2012-03-09 MINCCOMPLETE(1)
All times are GMT -4. The time now is 09:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy