Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Cat command does not respect new line Post 302985211 by vbe on Monday 7th of November 2016 09:02:35 AM
Old 11-07-2016
And just tested the alias version going this time the right way:
Code:
mnas:/port-f/vbe $ alias ux2dos='sed "s/ \{1,\}$/^M/" | sed "$ s/^Z//"'
mnas:/port-f/vbe $ cat 0001_conv.txt| ux2dos
 1 2 3 4 5 6 7 8 9
1 2 3 4 5
3 4 5 6
5 6 7
6 7
mnas:/port-f/vbe $ cat -v 0001_conv.txt| ux2dos
 1 2 3 4 5 6 7 8 9^M
1 2 3 4 5^M
3 4 5 6^M
5 6 7^M
6 7^M
mnas:/port-f/vbe $ which ux2dos
mnas:/port-f/vbe $                                              # no answer meaning the above used the alias...

So now you should be able to finalise...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

using 'cat' to in 'while read line'

Hi, I'm having some trouble reading a file that was 'cat' through a while loop. Can anyone suggest alternatives? what i do is cat filename|grep *.stuff while read line do echo $line ... and other commands done The cat,grep line seems to work correctly, but the script hangs when i add in... (3 Replies)
Discussion started by: chugger06
3 Replies

2. Shell Programming and Scripting

Cat'ing a multiple line file to one line

I am writing a script that is running a loop on one file to obtain records from another file. Using egrep, I am finding matching records in file b, then outputing feilds of both into another file. **************************** filea=this.txt fileb=that.txt cat $filea | while read line do... (1 Reply)
Discussion started by: djsal
1 Replies

3. UNIX for Advanced & Expert Users

Amoung tar and gzip whiich unix command is more practical with respect to space manag

Hi All Can any body help me out. Amoung tar and gzip whiich unix command is more practical with respect to space management and file restoration. Eg if I use tar or gzip which will be more helpful to reduce the space and during the file restoration. Please help me out. regards... (3 Replies)
Discussion started by: manas6
3 Replies

4. UNIX for Dummies Questions & Answers

Difference between cat , cat > , cat >> and touch !!!

Hi Can anybody tell the difference between Difference between cat , cat > , cat >> and touch command in UNIX? Thanks (6 Replies)
Discussion started by: skyineyes
6 Replies

5. Shell Programming and Scripting

cat file1 read line-per-line then grep -A 15 lines down in fileb

STEP 1 # Set variable FILE=/tmp/mainfile SEARCHFILE =/tmp/searchfile # THIS IS THE MAIN FILE. cat /tmp/mainfile Interface Ethernet0/0 "outside", is up, line protocol is up Hardware is i82546GB rev03, BW 100 Mbps Full-Duplex(Full-duplex), 100 Mbps(100 Mbps) MAC address... (6 Replies)
Discussion started by: irongeekio
6 Replies

6. Shell Programming and Scripting

cat in the command line doesn't match cat in the script

Hello, So I sorted my file as I was supposed to: sort -n -r -k 2 -k 1 file1 | uniq > file2 and when I wrote > cat file2 in the command line, I got what I was expecting, but in the script itself ... sort -n -r -k 2 -k 1 averages | uniq > temp cat file2 It wrote a whole... (21 Replies)
Discussion started by: shira
21 Replies

7. Shell Programming and Scripting

bash: cat multiple files together except first line?

Hopefully the title summarized what I need help with. I have multiple files that I would like to concatenate in bash. ie: cat file1 file2 file3 > bigfile except I do not want to include the first line from each file (). Any help? Thanks. (6 Replies)
Discussion started by: sanimfj
6 Replies

8. Shell Programming and Scripting

Shell Scripting:Fetching content from each line with respect to pattern.

one.txt ONS.820.log:V 20Oct2010:GP ^ ^ ONS.123.log:V 21Oct2010:GP ^ ^ ONS.820.log:V 30Oct2010:GP ^ ^ want to make new file from existing one with addition. 20Oct2010 User KV001 has name tk003 with buffer- 338-1 21Oct2010 User KV003 has name tk002 with buffer- 338-2 30Oct2010 User KV002... (5 Replies)
Discussion started by: saluja.deepak
5 Replies

9. Shell Programming and Scripting

for loop with whole line using cat

Hi all, I need to create loop script to read full line and append a variable to each line. cat file I need the output like below 10.0.0.1,136 1 24 048800 id N4 No_Light 10.0.0.1,137 1 25 048900 id N4 No_Light 10.0.0.1,140 1 28 048c00 id N4 No_Light 10.0.0.1,262 1 38 048e80... (13 Replies)
Discussion started by: ranjancom2000
13 Replies

10. AIX

Script to cat and dd last line!!! of each file

hi Guys, Am new to this awesome forum, and yea i need some help here asap thnx :) i have a directory with over 34000 text files, i need a script that will delete the last line of each of this file without me necessary opening the files. illustration:- file1 200 records file2 130 records... (5 Replies)
Discussion started by: eetang
5 Replies
VHDL(5)                                               VHDL subset of ASIM/LIP6/CAO-VLSI lab.                                               VHDL(5)

NAME
ALLIANCE VHDL Subset ORIGIN
This software belongs to the ALLIANCE CAD SYSTEM developed by the ASIM team at LIP6 laboratory of Universite Pierre et Marie CURIE, in Paris, France. Web : http://asim.lip6.fr/recherche/alliance/ E-mail : alliance-users@asim.lip6.fr DESCRIPTION
The ALLIANCE VHDL subset is dedicated to digital synchronous circuits design. The same subset is used for: logic simulation (asimut) logic synthesis (boom, boog, loon) functionnal abstraction (yagle) formal proof (proof) The ALLIANCE VHDL subset is fully compatible with the IEEE VHDL standard Ref. 1076 (1987). That means that a VHDL description using the ALLIANCE subset can be simulated with any full-VHDL commercial compiler-simulator. Here follows the main restrictions of the ALLIANCE subset. The VHDL description of a circuit is made of two seperate parts: the external view and the internal view. The external view defines the name of the circuit and its interface. The interface of a circuit is a list of ports. Each port is specified by its name, its mode, its type, its constraint for an array and, its kind. The mode of a port depends only on the manner the port is used inside the circuit (in the internal view of the circuit). If the value of a port is to be read in the view of the description, the port must be declared with the mode in. If the value of a port is to be written by the internal view, the port must be declared with the mode out. If both above conditions are satisfied the port must be declared with the mode inout. Only structural and behavioural data flow are supported as internal view. In order to allow automatic translation from structural VHDL to other netlist formats (EDIF, ALLIANCE, COMPASS, ...) it is not possible to mix behavioural and structural description. Of course, a circuit, a subcircuit or a cell can have two different descriptions: a structural view may be defined in a file with a .vst extension (see vst(5)). a behavioural data flow description may be defined in a file with a .vbe extension (see vbe(5)). A typical VHDL model will be made of a hierarcical structural description (a hierarchy of structural files) and, for each leaf cell, a behavioural description. In a behavioural description, only concurrent statements (except process) are supported. Up to now, sequential statements are not allowed by the ALLIANCE VHDL compiler. Timing information can be specified in behavioural descriptions using After clauses. However, those delays are currently only used for sim- ulation. After clauses are supported but not used for synthesis and formal proof. A predefined set of types has been defined (other user defined types are not supported): bit the predefined standard bit type ('0' or '1') bit_vector array of bit mux_bit a resolved subtype of bit using the mux resolution function. This function checks that only one driver is actually connected to a signal. The effective value of the signal is the value of the active driver. If all drivers are disconnected, the value of the signal is '1' (pull up). A signal of type mux_bit must be declared with the kind bus. mux_vector array of mux_bit wor_bit a resolved subtype of bit using the wor resolution function. This function allows a signal be driven by more than one driver. All active drivers have to drive the same value. The effective value of the signal is the value of active drivers. If all drivers are disconnected, the value of the signal is '1' (pull up). A signal of type wor_bit must be declared with the kind bus. wor_vector array of wor_bit reg_bit a resolved subtype of bit using the reg resolution function. This function checks that only one driver is actually connected to a signal. The effective value of the signal is the value of the active driver. A signal of type reg_bit must be declared with the kind register (which makes the signal keep its previous value when all drivers are disconnected). reg_vector array of reg_bit In the next ALLIANCE release the VHDL subset will be largely extended (sequential statements, user defined types) . SEE ALSO
vst(5), vbe(5), asimut(1), boom(1), loon(1), boog(1), proof(1) BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory. We need your feedback to improve documentation and tools. ASIM
/LIP6 October 1, 1997 VHDL(5)
All times are GMT -4. The time now is 12:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy