Sponsored Content
Top Forums Shell Programming and Scripting Lex: concatenating word into array of c-strings Post 302732393 by Corona688 on Saturday 17th of November 2012 12:23:30 PM
Old 11-17-2012
[redacted]
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Concatenating Strings

Is there any function to concatenate strings in shell script (2 Replies)
Discussion started by: radhika03
2 Replies

2. Shell Programming and Scripting

concatenating strings..

hey guys.. probably a simple question but i cant seem to find any info on it. i have a small array of strings, and i want to concatenate the contents of the array into one big string. any ideas on how i can do this? cheers. (2 Replies)
Discussion started by: jt_csv
2 Replies

3. Shell Programming and Scripting

mailx: concatenating strings for message body (KSH)

Hi all, Think this is a pretty simple problem, but I've been thinking about it for a few days. Let's say that I'm going to have to output the contents of a file as the body of a mailx message. I'll probably do this: cat <filename> | mailx <extra commands> However, how do I go about doing... (1 Reply)
Discussion started by: rockysfr
1 Replies

4. Programming

Concatenating array of strings into one string separated by spaces

Hi, Well as the title says, I have an array of strings (delimited by null). The length of the array is variable and length of each string is variable as well. What I need is one huge string with the original strings in the array separated by spaces. For example is an array is such that array... (12 Replies)
Discussion started by: newhere
12 Replies

5. Shell Programming and Scripting

concatenating strings

I m new to shell scripting and what i want is take as an i/p from command line the name of the file and inside my script i should redirect the o/p of my few commands to this file concatenated with .txt for example if i give ./linux filename i should get the o/p in filename.txt i need to... (2 Replies)
Discussion started by: tulip
2 Replies

6. Shell Programming and Scripting

CSH: Concatenating Strings, how to add new line character and functions?

Hello, I'm trying to run a program on a directory (traverse sub dirs too) through my csh script. Arrays support in CSH is appalling, something like associative arrays would have helped me do this so much easier. Anyway, I want to hold some details extracted from the program and then at the... (0 Replies)
Discussion started by: ragabonds
0 Replies

7. Shell Programming and Scripting

How to preserve space while concatenating strings? (KSH)

I have these str1=$(echo "This is string one with spaces \n This is also my sentence 1") When I echo $str1, it displays the new line character properly. Now I have another new variable say str2. I want to concatenate in this way.. str1 + newline character + and then str2. That's I... (3 Replies)
Discussion started by: dahlia84
3 Replies

8. Shell Programming and Scripting

Problem in concatenating two Strings

Hi Friends, I'm new to shell scripting and trying to concatenate two Strings to create a filepath like string but I'm getting an unexpected result. here is my code for 'runToneUserLoad.sh': script_dir="$(dirname $0)" echo "Script Dir:$script_dir" dirtest1="/installedUtility"... (6 Replies)
Discussion started by: kuldeept
6 Replies

9. Shell Programming and Scripting

Concatenating strings and run it in bash

Hi, all, I tried to write a simple shell script as follow: #!/bin/bash # What want to do in bash is following # : pcd_viewer cloud_cluster_0.pcd cloud_cluster_1.pcd cloud_cluster_2.pcd cloud_cluster_3.pcd cloud_cluster_4.pcd STR = "pcd_viewer" for i in `seq 0 4` do STR... (1 Reply)
Discussion started by: bedeK
1 Replies

10. Shell Programming and Scripting

Concatenating 2 lines from 2 files having matching strings

Hello All Unix Users, I am still new to Unix, however I am eager to learn it.. I have 2 files, some lines have some matching substrings, I would like to concatenate these lines into one lines, leaving other untouched. Here below is an example for that.. File 1 (fasta file): >292183... (6 Replies)
Discussion started by: Mohamed EL Hadi
6 Replies
LEX(1)							      General Commands Manual							    LEX(1)

NAME
lex - generator of lexical analysis programs SYNOPSIS
lex [ -tvn ] [ file ... ] DESCRIPTION
Lex generates programs to be used in simple lexical analysis of text. The input files (standard input default) contain regular expressions to be searched for and actions written in C to be executed when expressions are found. A C source program, lex.yy.c is generated. This program, when run, copies unrecognized portions of the input to the output, and executes the associated C action for each regular expression that is recognized. The options have the following meanings. -t Place the result on the standard output instead of in file lex.yy.c. -v Print a one-line summary of statistics of the generated analyzer. -n Opposite of -v; -n is default. EXAMPLES
This program converts upper case to lower, removes blanks at the end of lines, and replaces multiple blanks by single blanks. %% [A-Z] putchar(yytext[0]+'a'-'A'); [ ]+$ [ ]+ putchar(' '); FILES
lex.yy.c output /sys/lib/lex/ncform template SEE ALSO
yacc(1), sed(1) M. E. Lesk and E. Schmidt, `LEX--Lexical Analyzer Generator', Unix Research System Programmer's Manual, Tenth Edition, Volume 2. SOURCE
/sys/src/cmd/lex BUGS
Cannot handle UTF. The asteroid to kill this dinosaur is still in orbit. LEX(1)
All times are GMT -4. The time now is 08:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy