Sponsored Content
Full Discussion: Printing in Upper
Top Forums Shell Programming and Scripting Printing in Upper Post 58390 by zazzybob on Friday 19th of November 2004 11:59:41 AM
Old 11-19-2004
Okay, change this to your needs, but something like
Code:
#!/bin/sh

echo "Enter tables..."
# separate tables by space
read tab

for term in $tab
do
  quotetab="$quotetab '$term'"
done

echo "$quotetab" | tr ' ' ',' | sed 's/,//' | tr '[a-z]' '[A-Z]'

exit 0

Works.

If I run it...
Code:
$ ./testscript
Enter tables...
my list of tables
'MY','LIST','OF','TABLES'
$

Cheers
ZB
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Upper And Lower Case

Hi! I pass a parameter to a script code and I have to make it upper case before use: $ MyShell aBcDe script code: UpperVariable=function($1) I can't know how make function, maybe some sed option? Thank You, PARIDE (1 Reply)
Discussion started by: pciatto
1 Replies

2. UNIX for Advanced & Expert Users

Printing Problems in unix ... ( Bar-cdoe - Ip Printing)

Hi guys ... i need ur help with some printing problem in unix ... first prob. : i wanna print from my NCR unix to an Win NT , Ip based printing server ( HP JetDirect ) . My issue , is it possible to print directly to an Ip address from unix ? How do i make it work to get any results ?... (3 Replies)
Discussion started by: QuickSilver
3 Replies

3. UNIX for Dummies Questions & Answers

File xfer upper cap?

Is there any setting required to define upper cap for a user to restrict the file transmission? If yes, what it is & can non-admin user be able to revoke that? (0 Replies)
Discussion started by: videsh77
0 Replies

4. Shell Programming and Scripting

convertin in to upper case

write a shell script that accepts one or more file name as arguments and converts all of them to uppercase,provided they exist in the current directory:b::b::b: (2 Replies)
Discussion started by: shawz
2 Replies

5. Shell Programming and Scripting

lower to upper case in ksh

What is the command to change the contents of a file to UPPER case. Here in this file below you see some characters are Sp, Ch 1200812270046581 22885072800000652 B86860003OLFXXX592123320081227 22885029800000652 B86860003ODL-Sp592123420081227 22885093700000652-B94030001ODL-Ch592123520081227... (4 Replies)
Discussion started by: kshuser
4 Replies

6. Windows & DOS: Issues & Discussions

Linux to Windows Printing: PDF starts printing from middle of page.

We are using Red Hat. We have a issue like this: We want to print from Linux, to a printer attached to a Windows machine. What we want to print is a PDF. It prints, but the printing starts from the middle of the page. In the report, there is no space at the top but still printing starts from the... (5 Replies)
Discussion started by: rohan69
5 Replies

7. UNIX for Dummies Questions & Answers

Sco Unix printing : jobs hangs in queue - printing via lp versus hpnpf

Hi, We have a Unix 3.2v5.0.5. I installed a printer via scoadmin, HP network printer manager with network peripheral name (hostname and ipadres are in /etc/hosts). This is the configuration file : Code: root@sco1 # cat configurationBanner: on:AlwaysContent types: simpleDevice:... (0 Replies)
Discussion started by: haezeban
0 Replies

8. Shell Programming and Scripting

Upper and Lower case

Hi, I think this is a weird problem. I have two files...one with all UPPER case and the other one with a mix of upper and lower. Match each record in file1 against record in file2, if they match, then change the record in file1 to that of record in file2. Thanks in advance. (2 Replies)
Discussion started by: jacobs.smith
2 Replies

9. Shell Programming and Scripting

Upper case letter match

Hi, im able to search for string in a file (ex: grep -w "$a" input.txt). but i have to search for the uppercase of a string in a file where upper case of the file content matches something like below. where upper("$a")== converted to upper case string in (input.txt) can someone please provide... (5 Replies)
Discussion started by: p_satyambabu
5 Replies

10. Shell Programming and Scripting

Lower to upper..tr + awk ?

I have a file that has a pattern 2 lines, blanktwo line If encountering the first line, the 2nd line need to be converted to UPPERCASE...or...conver the 2nd line after ablank into uppercase Is there a 'tr' function in awk..(probably the best tool over sed) ? i.e. ......................... (6 Replies)
Discussion started by: stevie_velvet
6 Replies
SYSTEM(3)								 1								 SYSTEM(3)

system - Execute an external program and display the output

SYNOPSIS
string system (string $command, [int &$return_var]) DESCRIPTION
system(3) is just like the C version of the function in that it executes the given $command and outputs the result. The system(3) call also tries to automatically flush the web server's output buffer after each line of output if PHP is running as a server module. If you need to execute a command and have all the data from the command passed directly back without any interference, use the passthru(3) function. PARAMETERS
o $command - The command that will be executed. o $return_var - If the $return_var argument is present, then the return status of the executed command will be written to this variable. RETURN VALUES
Returns the last line of the command output on success, and FALSE on failure. EXAMPLES
Example #1 system(3) example <?php echo '<pre>'; // Outputs all the result of shellcommand "ls", and returns // the last output line into $last_line. Stores the return value // of the shell command in $retval. $last_line = system('ls', $retval); // Printing additional info echo ' </pre> <hr />Last line of the output: ' . $last_line . ' <hr />Return value: ' . $retval; ?> NOTES
Warning When allowing user-supplied data to be passed to this function, use escapeshellarg(3) or escapeshellcmd(3) to ensure that users can- not trick the system into executing arbitrary commands. Note If a program is started with this function, in order for it to continue running in the background, the output of the program must be redirected to a file or another output stream. Failing to do so will cause PHP to hang until the execution of the program ends. Note When safe mode is enabled, you can only execute files within the safe_mode_exec_dir. For practical reasons, it is currently not allowed to have .. components in the path to the executable. Warning With safe mode enabled, the command string is escaped with escapeshellcmd(3). Thus, echo y | echo x becomes echo y | echo x. SEE ALSO
exec(3), passthru(3), popen(3), escapeshellcmd(3), pcntl_exec(3), backtick operator. PHP Documentation Group SYSTEM(3)
All times are GMT -4. The time now is 06:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy