Sponsored Content
Operating Systems AIX Ajout colonne calcuée ds un fichier .txt Post 302460831 by zainab2006 on Thursday 7th of October 2010 06:15:31 PM
Old 10-07-2010
Ajout colonne calcuée ds un fichier .txt

Mon but est de créer un script ksh ou commande aix permettant ceci.
J'ai un fichier .txt organisé par bloc d'informations, chaque bloc débute par 000 et ce comme suit :

000...
001...
003...
004...
000...
001...
003...
004...
.
.
.Mon but est d'ajouter une colonne en fin de chaque ligne afin d'avoir un identifiant unique de chaque bloc, et ce comme suit :
000...1
001...1
003...1
004...1
000...2
001...2
003...2
004...2
.
.
Merci de votre aide Smilie!
 

10 More Discussions You Might Find Interesting

1. Solaris

Fichier d'erreur

bonjour Ou puis je trouver les fichiers d'erreur (l'équivalent du errpt sous Aix) sous Sun Solaris ? merci (5 Replies)
Discussion started by: pascalbout
5 Replies

2. UNIX for Dummies Questions & Answers

echo "ABC" > file1.txt file2.txt file3.txt

Hi Guru's, I need to create 3 files with the contents "ABC" using single command. Iam using: echo "ABC" > file1.txt file2.txt file3.txt the above command is not working. pls help me... With Regards / Ganapati (4 Replies)
Discussion started by: ganapati
4 Replies

3. Shell Programming and Scripting

Joindre deux fichier avec deux champs de jointure

Hello, I come to you asking you a hand on a script that I have performed on a unix server. I have two files that I have to concatenate in a single line. The first file is created like this: mag;code_art;campagne;st_juillet;st_aout;etc The second file is created like this:... (7 Replies)
Discussion started by: steph70
7 Replies

4. Filesystems, Disks and Memory

ajout d'espace a un FS sous NCR 4.0

Bonjour, J'ai un petit problème, je voudrais savoir comment faire pour ajouter de l'espace disque sur un NCR version 4 et surtout savoir si ce vdisk contient encore de l'espace disponible smp001-4 4.0 3.0 Par exemple sur ce vdisk : /dev/dsk/vdisk15 3940505 3807833 132672 97% /data... (1 Reply)
Discussion started by: magnetic
1 Replies

5. UNIX for Dummies Questions & Answers

find lines in file1.txt not found in file2.txt memory problem

I have a diff command that does what I want but when comparing large text/log files, it uses up all the memory I have (sometimes over 8gig of memory) diff file1.txt file2.txt | grep '^<'| awk '{$1="";print $0}' | sed 's/^ *//' Is there a better more efficient way to find the lines in one file... (5 Replies)
Discussion started by: raptor25
5 Replies

6. Shell Programming and Scripting

awk append fileA.txt to growing file B.txt

This is appending a column. My question is fairly simple. I have a program generating data in a form like so: 1 20 2 22 3 23 4 12 5 43 For ever iteration I'm generating this data. I have the basic idea with cut -f 2 fileA.txt | paste -d >> FileB.txt ???? I want FileB.txt to grow, and... (4 Replies)
Discussion started by: theawknewbie
4 Replies

7. Shell Programming and Scripting

Need to append the date | abcddate.txt to the first line of my txt file

I want to add/append the info in the following format to my.txt file. 20130702|abcd20130702.txt FN|SN|DOB I tried the below script but it throws me some exceptions. <#!/bin/sh dt = date '+%y%m%d'members; echo $dt+|+members+$dt; /usr/bin/awk -f BEGIN { FS="|"; OFS="|"; } { print... (6 Replies)
Discussion started by: harik1982
6 Replies

8. Shell Programming and Scripting

Desired output.txt for reading txt file using awk?

Dear all, I have a huge txt file (DATA.txt) with the following content . From this txt file, I want the following output using some shell script. Any help is greatly appreciated. Greetings, emily DATA.txt (snippet of the huge text file) 407202849... (2 Replies)
Discussion started by: emily
2 Replies

9. Shell Programming and Scripting

Help script shell find fichier

Hello, I am looking for a shell script that can 1- take as input a variable, like "server.cpu" 2- do a search for that variable in a directory that contains subdirectories. The search will start at the last subdirectory working up to the top level if I can not find the file 3-... (7 Replies)
Discussion started by: georg2014
7 Replies

10. Shell Programming and Scripting

Awk, sed, shell all words in INPUT.txt find in column1 of TABLE.txt and replce with column2 in

Hi dears i have text file like this: INPUT.txt 001_1_173 j nuh ]az 001_1_174 j ]esma. nuh ]/.xori . . . and have another text like this TABLE.txt j j nuh word1... (6 Replies)
Discussion started by: alii
6 Replies
set_color(1)							       fish							      set_color(1)

NAME
set_color - set_color - set the terminal color set_color - set the terminal color Synopsis set_color [-v --version] [-h --help] [-b --background COLOR] [COLOR] Description Change the foreground and/or background color of the terminal. COLOR is one of black, red, green, brown, yellow, blue, magenta, purple, cyan, white and normal. o -b, --background Set the background color o -c, --print-colors Prints a list of all valid color names o -h, --help Display help message and exit o -o, --bold Set bold or extra bright mode o -u, --underline Set underlined mode o -v, --version Display version and exit Calling set_color normal will set the terminal color to whatever is the default color of the terminal. Some terminals use the --bold escape sequence to switch to a brighter color set. On such terminals, set_color white will result in a grey font color, while set_color --bold white will result in a white font color. Not all terminal emulators support all these features. This is not a bug in set_color but a missing feature in the terminal emulator. set_color uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and incomplete terminfo databases, and may lack color information for terminals that support it. Download and install the latest version of ncurses and recompile fish against it in order to fix this issue. Version 1.23.1 Sun Jan 8 2012 set_color(1)
All times are GMT -4. The time now is 02:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy