Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Writing to a file without echo it to the console !!!! Post 302231016 by vbe on Monday 1st of September 2008 08:52:34 AM
Old 09-01-2008
What do you think >&1 stands for?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Tailing new log file & echo the string on console

Guys, I do have a script that runs to take the server out from network, after running the script it is writing the new log file{outFile} in to directory . Now what i need is my script should tail the last modified file{outFile} & search the string {Server Status} ans should echo the same at the... (0 Replies)
Discussion started by: raghunsi
0 Replies

2. UNIX for Dummies Questions & Answers

Windows to Linux remote console using VNC brings up blank console screen with only mouse pointer

:confused:Hi This was installed on the Linux box a few weeks back by a guy that no longer works for us. All worked fine until last week. Now when we connect its just a blank screen with no icons. I get a whole bunch of errors when starting the service too: Tue Feb 23 14:29:45 2010 ... (1 Reply)
Discussion started by: wbdevilliers
1 Replies

3. Shell Programming and Scripting

Searching for Log / Bad file and Reading and writing to a flat file

Need to develop a unix shell script for the below requirement and I need your assistance: 1) search for file.log and file.bad file in a directory and read them 2) pull out "Load_Start_Time", "Data_File_Name", "Error_Type" from log file 4) concatinate each row from bad file as... (3 Replies)
Discussion started by: mlpathir
3 Replies

4. Shell Programming and Scripting

Output of echo $$ differs in Script than console

Hi All, I have a very basic query for 'echo $$' command. When I am executing echo $$ on console then it is giving different output than the execution of echo $$ in a script. Console Output: ------------------------- bash-3.2$ echo $$ 15610 bash-3.2$ In Script:... (3 Replies)
Discussion started by: manishdivs
3 Replies

5. Shell Programming and Scripting

Writing html to a file with echo

Hi, I'm having an issue with echo again. I keep getting errors and no file content with these commands in a script. --------------------------------------------------- #!/bin/bash WEBSITE=http://www.google.com touch test1.txt echo "replace("<body>","<body><iframe... (2 Replies)
Discussion started by: digitalviking
2 Replies

6. Shell Programming and Scripting

[Shell/Perl(?)] Prepending timestamps to console output & writing results to a file

I do a lot of TSM work and I embarked on what I thought would be an easy task, and I'd be very happy for any input to save the pounding my keyboard is receiving :] By default, the output of TSM's console has no timestamping, making it hard to sort through accurately. This puts my console into... (5 Replies)
Discussion started by: Vryali
5 Replies

7. Shell Programming and Scripting

Problem with writing to output - awk, echo

Hello all, I wrote this command line for some calculation on my given input files based on another input file which is a txt file. while read BAM REGION; do samtools view $BAM $REGION | awk '{if ($2==0) print $0}' | wc -l >>log.txt; echo "$REGION"; done >> log.txt <regions.txt It takes... (4 Replies)
Discussion started by: @man
4 Replies

8. Shell Programming and Scripting

awk - writing matching pattern to a new file and deleting it from the current file

Hello , I have comma delimited file with over 20 fileds that i need to do some validations on. I have to check if certain fields are null and then write the line containing the null field into a new file and then delete the line from the current file. Can someone tell me how i could go... (2 Replies)
Discussion started by: goddevil
2 Replies

9. Shell Programming and Scripting

[Solved] Writing output to the console

Hi All, I have written one script in which am writting the result to the log file. I want to display the results on the console also if ; then echo "$result doesnot match with the host file">>InputHostsFileErrors.txt else echo "$result input matches with the host... (7 Replies)
Discussion started by: sharsour
7 Replies

10. Shell Programming and Scripting

How to read each line from input file, assign variables, and echo to output file?

I've got a file that looks like this (spaces before first entries intentional): 12345650-000005000GL140227 ANNUAL HELC FEE EN 22345650-000005000GL140227 ANNUAL HELC FEE EN 32345650-000005000GL140227 ANNUAL HELC FEE EN I want to read through the file line by line,... (6 Replies)
Discussion started by: Scottie1954
6 Replies
TR(1)							      General Commands Manual							     TR(1)

NAME
tr - translate characters SYNOPSIS
tr [ -cds ] [ string1 [ string2 ] ] DESCRIPTION
Tr copies the standard input to the standard output with substitution or deletion of selected characters. Input characters found in string1 are mapped into the corresponding characters of string2. When string2 is short it is padded to the length of string1 by duplicat- ing its last character. Any combination of the options -cds may be used: -c complements the set of characters in string1 with respect to the universe of characters whose ASCII codes are 01 through 0377 octal; -d deletes all input characters in string1; -s squeezes all strings of repeated output characters that are in string2 to single characters. In either string the notation a-b means a range of characters from a to b in increasing ASCII order. The character `' followed by 1, 2 or 3 octal digits stands for the character whose ASCII code is given by those digits. A `' followed by any other character stands for that character. The following example creates a list of all the words in `file1' one per line in `file2', where a word is taken to be a maximal string of alphabetics. The second string is quoted to protect `' from the Shell. 012 is the ASCII code for newline. tr -cs A-Za-z '12' <file1 >file2 SEE ALSO
ed(1), ascii(7) BUGS
Won't handle ASCII NUL in string1 or string2; always deletes NUL from input. TR(1)
All times are GMT -4. The time now is 06:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy