Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Format output from "echo" command Post 302442860 by jim mcnamara on Thursday 5th of August 2010 05:22:51 PM
Old 08-05-2010
look into the fold command
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need a Command To display "echo command value in loop" in single line.

Hi I want to display "echo command value in loop" in single line. My requirement is to show the input file (test_1.txt) like the output file (test_2.txt) given below. Input file :test_1.txt a1|b1|4|5 a1|b1|42|9 a2|b2|32|25 a1|b1|2|5 a3|b3|4|8 a2|b2|14|6 Output file:test_2.txt... (2 Replies)
Discussion started by: sakthifire
2 Replies

2. Shell Programming and Scripting

how to include "*" in echo command????

Hi All, I am doing one simple web tool. I have a HTML as my front end and cgi as my backend. Here my pb is when I assign the html form input to a variable in my script, it is not accepting the special char "*" to that varible. say I have a text box(Name : in_query) in html and trying to... (1 Reply)
Discussion started by: askumarece
1 Replies

3. Shell Programming and Scripting

ksh script that echo " please insert your name " and store the output to a login.log file.

Hello All Nice to meet you all here in this forum, it's my 1rst time here i'm asking about a little issue that i face i added a ksh script that echo " please insert your name " and store the output to a login.log file. the script is working fine with normal telnet but Xstart is not working... (8 Replies)
Discussion started by: islam.said
8 Replies

4. UNIX for Dummies Questions & Answers

Explanation of "total" field in "ls -l" command output

When I do a listing in one particular directory (ls -al) I get: total 43456 drwxrwxrwx 2 root root 4096 drwxrwxrwx 3 root root 4096 -rwxrwxr-x 1 nobody nobody 3701594 -rwxrwxr-x 1 nobody nobody 3108510 -rwxrwxr-x 1 nobody nobody 3070580 -rwxrwxr-x 1 nobody nobody 3099733 -rwxrwxr-x 1... (1 Reply)
Discussion started by: proactiveaditya
1 Replies

5. Shell Programming and Scripting

Format output from the file to extract "date" section

Hello Team , I have to extract date section from the below file output. The output of the file is as shown below. I have to extract the "" this section from the above output of the file. can anyone please let me know how can we acheive this? (4 Replies)
Discussion started by: coolguyamy
4 Replies

6. Shell Programming and Scripting

Amend format of output from "last"command

When I run a “last” command, I am getting more than one row per user. Eg userabc pts/2 10.253.0.108 Tue Dec 14 09:21 still logged in userabc pts/2 10.253.0.108 Tue Dec 14 03:57 - 03:59 (00:01) userabc pts/2 10.253.0.108 Mon Dec 13 14:25 - 15:43 (01:18) userpqr pts/3 10.253.0.39 Wed Jan... (5 Replies)
Discussion started by: malts18
5 Replies

7. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

8. Shell Programming and Scripting

"links -dump" output format issue

Hi All, I tried searching a lot about this but to no avail. I have a HTML file. I used links -dump file_page.html > text_html.txt What the above command gave me was a filtered text from the HTML file with tags removed. Now, the the output from the above command looked something like this:... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

9. Shell Programming and Scripting

tcsh - understanding difference between "echo string" and "echo string > /dev/stdout"

I came across and unexpected behavior with redirections in tcsh. I know, csh is not best for redirections, but I'd like to understand what is happening here. I have following script (called out_to_streams.csh): #!/bin/tcsh -f echo Redirected to STDOUT > /dev/stdout echo Redirected to... (2 Replies)
Discussion started by: marcink
2 Replies

10. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
FOLD(1) 						    BSD General Commands Manual 						   FOLD(1)

NAME
fold -- fold long lines for finite width output device SYNOPSIS
fold [-bs] [-w width] [file ...] DESCRIPTION
The fold utility is a filter which folds the contents of the specified files, or the standard input if no files are specified, breaking the lines to have a maximum of 80 columns. The options are as follows: -b Count width in bytes rather than column positions. -s Fold line after the last blank character within the first width column positions (or bytes). -w width Specify a line width to use instead of the default 80 columns. Width should be a multiple of 8 if tabs are present, or the tabs should be expanded using expand(1) before using fold. ENVIRONMENT
The LANG, LC_ALL and LC_CTYPE environment variables affect the execution of fold as described in environ(7). SEE ALSO
expand(1), fmt(1) STANDARDS
The fold utility conforms to IEEE Std 1003.1-2001 (``POSIX.1''). BUGS
If underlining is present it may be messed up by folding. BSD
August 2, 2004 BSD
All times are GMT -4. The time now is 07:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy