Sponsored Content
Top Forums Shell Programming and Scripting Bash Script: Echo continuation across many lines Post 303013735 by Don Cragun on Tuesday 27th of February 2018 02:44:13 AM
Old 02-27-2018
We've been here before...

Having <backslash><space><newline> instead of <backslash><newline> does not give you a continuation line; it gives you an escaped <space> character on one line and your unrecognized command on the next line.
This User Gave Thanks to Don Cragun For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Mac OS X Script Continuation Character?

Some of my scripts have very long commands that go beyond the horizontal scroll limits of my screen (1024 x 768), even with a very small font. Is there a continuation character (like the option+l "ell") in AppleScript that will let me break up the line? Right now I just press a hard return to... (2 Replies)
Discussion started by: cassj
2 Replies

2. Shell Programming and Scripting

Script with error output but continuation in script?

I have written a basic fetching script. The script logs into an FTP site, downloads a .zip file, then unzips and moves the files to the necessary folders, then deletes them, etc. The problem I have is if one of the files no longer exists on the FTP site or another part of the script fails, then... (3 Replies)
Discussion started by: daem0n
3 Replies

3. Shell Programming and Scripting

bash script too many fields wraps to multiple lines

Hello. I'm trying to write a script to take a 5 field file, do some math, and extend it to 9 fields. Problem is, the script keeps wrapping it to two lines, even tho 9 fields, tab separated (even comma separated) doesn't fill the screen. Even if it did, I'm eventually copying it to an excel ... (2 Replies)
Discussion started by: JoeNess
2 Replies

4. Shell Programming and Scripting

Bash script find longest line/lines in several files

Hello everyone... I need to find out, how to find longest line or possibly lines in several files which are arguments for script. The thing is, that I tried some possibilities before, but nothing worked correctly. Example when i use: awk ' { if ( length > L ) { L=length ;s=$0 } }END{ print... (23 Replies)
Discussion started by: 1tempus1
23 Replies

5. Shell Programming and Scripting

problem in bash echo

I am using the echo command to send the output to the file. I am using the following code: echo "service started successfully\n" > log But when I do: cat log I get: service started successfully\n Instead of a newline after the "successfully" Why is that and how can I fix it? (3 Replies)
Discussion started by: programAngel
3 Replies

6. Shell Programming and Scripting

echo in bash

Why does echo supress line breaks in bash? I'm working on a script that starts like this: words=`sort list.txt | uniq` echo $words | wc -l I need to number the lines and then do other stuff. I'd use jot, but it's not installed, so I hope I can get seq to do what I want. But first I need to... (2 Replies)
Discussion started by: mregine
2 Replies

7. Shell Programming and Scripting

Preserve extented ascii character when run echo comand inside bash script

Hi everyone, I'm echo some text with extended ascii characters as below: echo -e "Pr\xE9sentation du spectacle" > output or echo -e "Présentation du spectacle" > outputIf I open the file created I see this text Présentation du spectacleThe text is shown correctly in this created file when... (7 Replies)
Discussion started by: Ophiuchus
7 Replies

8. Shell Programming and Scripting

Bash script - printing range of lines from text file

I'm working on a new exercise that calls for a script that will take in two arguments on the command line (representing the range of line numbers) and will subsequently print those lines from a a specified file. Command line would look like this: ./lines_script.bash 5 15 <file.txt. The script would... (8 Replies)
Discussion started by: ksmarine1980
8 Replies

9. Shell Programming and Scripting

Bash to store result in variable for other lines in script to use

I can not figure out how to capture the $filename variable store by the bash. #!/bin/bash # oldest folder stored as variable for analysis, version log created, and quality indicators matched to run dir=/home/cmccabe/Desktop/NGS/test find "$dir" -maxdepth 1 -mindepth 1 -type d -printf... (5 Replies)
Discussion started by: cmccabe
5 Replies

10. Shell Programming and Scripting

Continuation lines to be glued back to original line

I am parsing a log with this format: 06:36:12.230 details here 06:36:12.250 details here 06:36:12.260 details here continuation here 06:36:12.360 details here As you can see, some detail info contains one or more "\n" and it breaks my line-oriented parsing. I need to get those... (3 Replies)
Discussion started by: migurus
3 Replies
authcap(4)						     Kernel Interfaces Manual							authcap(4)

NAME
authcap - security databases for trusted systems SYNOPSIS
DESCRIPTION
All security-relevant databases are stored in an ASCII format in the file system. This format is converted to binary structures by support routines described in Section 3 manpages. This manpage describes the format of these databases, and describes the philosophy of conversion into data structures. Hierarchy Structure The complete database resides in two hierarchies: and The first hierarchy contains the Protected Password database, and has subdirectories with single letter names, each of which is a starting letter for user names. Within each of these directories are regular files, each con- taining an authcap(4) format file containing the Protected Password entry for a particular user. Thus, all user names beginning with have their respective authentication and identity information in a file in directory Directories within and contain system-wide information. Global system settings reside in directory Terminal and device assignment files are located in directory The following database files reside in directory Default Control The following database files reside in directory Terminal Control Device Assignment File Format Each data file and has the same format. Each file consists of one virtual line, optionally split into multiple physical lines with the character present at the end of all lines except the last. For example, the line can be split into: Note that all capabilities must be immediately preceded and followed with the separator. Multiple line entries require at the end of each line and at the beginning of each continuation line in the entry. Continuation lines are indented by a tab character. Multiple entries are separated by a new-line character that is not preceded by a continuation character: Line Format The format of a line is briefly as follows: The entry is referenced by the name. The end of the name part of the entry is terminated by the character. At the end of each entry is the chkent field. This is used as an integrity check on each entry. The routines reject all entries that do not contain the chkent terminator. Each entry has 0 or more capabilities, each terminated with the character. Each capability has a unique name. Numeric capabilities have the format: where num is a decimal or (0-preceded) octal number. Boolean capabilities have the format: id or id@ where the first form signals the presence of the capability and the second form signals the absence of the capability. String capabilities have the format: where string is 0 or more characters. The and characters are escaped as and respectively. File Locking All databases use a lock file, the existence of which means that the file is currently being rewritten. Occasionally, the lock files remain after a system crash and must be removed manually. The lock file is formed by appending to the database file name. Fields/Flags All databases are converted into structures by programs. The data structures consist of two substructures, each of which has one member for each field in the database entry. The field structure contains a field value (for example, a number, a boolean flag, a directory string, or a mask), while the flag value (one bit) indicates the presence or absence of the field in that entry. WARNINGS
HP-UX 11i Version 3 is the last release to support trusted systems functionality. AUTHOR
was developed by HP. SEE ALSO
getdvagent(3), getprdfent(3), getprpwent(3), getprtcent(3), default(4), devassign(4), prpwd(4), ttys(4). TO BE OBSOLETED authcap(4)
All times are GMT -4. The time now is 08:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy