09-03-2014
Thanks for pointing out the error (it should have been 4th and not 3rd). I just updated the original post.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have the a file with the following data.
File Content.
1249 snf06.3.0 sw version 1.1 code MD5 192F MD4 MD3
1248 sns06.3.0 sw version 1.1 code MD5 192F MD12
1250 sns06.3.0 sw version 1.1 code MD5 192F0\ MD8
1241 sns06.3.0 sw code MD5 19
1243 sn06.3.0 sw version 1.1 code MD5 19
12... (17 Replies)
Discussion started by: knijjar
17 Replies
2. UNIX for Dummies Questions & Answers
hi,
say I have
dirA/file1
dirB/file2
and I tar them up, and then do
zcat Tar.tar | tar tvf -
Sometimes I will see:
dirA/
dirA/file1
dirB/
dirB/file2
yet other times I will see (4 Replies)
Discussion started by: JamesByars
4 Replies
3. Shell Programming and Scripting
I have several files with say something like
cat
sparrow
I can grep for "cat" and "sparrow" and usually the output is one below the other
cat
sparrow
How can I view these as columns say
Pets Birds
cat sparrow
Would be great if this can be on command line using awk or... (1 Reply)
Discussion started by: gubbu
1 Replies
4. Shell Programming and Scripting
Hi,
I'm working with gawk (on DOS) today.
A goal is: find a string for-instance '123', cut a line in two columns and write second one. The problem is: command line works OK, awk file doesn't. But I would like to work with file because there are many strings to find.
input:
line command:
awk... (4 Replies)
Discussion started by: frajer
4 Replies
5. Shell Programming and Scripting
Hey,
Need some help for command to print only lines with two columns in a file
abc 111
cde 222
fgh
ijk 2
klm 12 23
nop
want the ouput to be
abc 111
cde 222
ijk 2
Thanks a lot in advance!!! (3 Replies)
Discussion started by: leo.maveriick
3 Replies
6. Shell Programming and Scripting
Hi,
TASK 1:
I have been using this code to print the information of files kept at "/castor/cern.ch/user/s/sudha/forPooja" in some text file name FILE.txt.
rfdir /castor/cern.ch/user/s/sudha/forPooja | grep data | awk '{print "rfio:///castor/cern.ch/user/s/sudha/forPooja/"$9}' > FILE.txt
... (6 Replies)
Discussion started by: nrjrasaxena
6 Replies
7. Shell Programming and Scripting
Hi,
I have a input file with many records as below:
1J4RR4GG0BC508200 68646 1 N M
i want my output file to be like with columns included dgismdh and timestamp :
Example:
1J4RR4GG0BC508200 68646 1 N M dgismdh 2012-02-21 07:22:25.98591
How to do it.can we do using awk?
Pls help. (6 Replies)
Discussion started by: sonam273
6 Replies
8. Shell Programming and Scripting
cat file |grep -v "xx" | grep -v "yy" |grep -v "zz" (3 Replies)
Discussion started by: yanglei_fage
3 Replies
9. Shell Programming and Scripting
I need to change the order of the columns of data that looks like this:
The original data is in 6 tab-separated columns.
FACTSHEET factsheet NN 1 5 DEP
WHAT what WP 2 3 SBJ
IS be VBZ 3 1 NMOD
AIDS AIDS NP ... (1 Reply)
Discussion started by: owwow14
1 Replies
10. Shell Programming and Scripting
Hi all, I have a query that runs that outputs data in the following format -
01/09/12 11:43:40,ADMIN,4,77,Application Group Load: Name(TESTED) LoadId(5137-1-0-1XX-15343-15343) File(/dir/dir/File.T03.CI2.RYR.2012009.11433350806.ARD) InputSize(5344) OutputSize(1359) Rows(2) Time(1.9960)... (8 Replies)
Discussion started by: jeffs42885
8 Replies
TABS(1) BSD General Commands Manual TABS(1)
NAME
tabs -- set terminal tabs
SYNOPSIS
tabs [-n | -a | -a2 | -c | -c2 | -c3 | -f | -p | -s | -u] [+m[n]] [-T type]
tabs [-T type] [+[n]] n1[,n2,...]
DESCRIPTION
The tabs utility displays a series of characters that clear the hardware terminal tab settings then initialises tab stops at specified posi-
tions, and optionally adjusts the margin.
In the first synopsis form, the tab stops set depend on the command line options used, and may be one of the predefined formats or at regular
intervals.
In the second synopsis form, tab stops are set at positions n1, n2, etc. If a position is preceded by a '+', it is relative to the previous
position set. No more than 20 positions may be specified.
If no tab stops are specified, the ``standard'' UNIX tab width of 8 is used.
The options are as follows:
-n Set a tab stop every n columns. If n is 0, the tab stops are cleared but no new ones are set.
-a Assembler format (columns 1, 10, 16, 36, 72).
-a2 Assembler format (columns 1, 10, 16, 40, 72).
-c COBOL normal format (columns 1, 8, 12, 16, 20, 55)
-c2 COBOL compact format (columns 1, 6, 10, 14, 49)
-c3 COBOL compact format (columns 1, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62, 67).
-f FORTRAN format (columns 1, 7, 11, 15, 19, 23).
-p PL/1 format (columns 1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61).
-s SNOBOL format (columns 1, 10, 55).
-u Assembler format (columns 1, 12, 20, 44).
+m[n], +[n]
Set an n character left margin, or 10 if n is omitted.
-T type
Output escape sequence for the terminal type type.
ENVIRONMENT
The LANG, LC_ALL, LC_CTYPE and TERM environment variables affect the execution of tabs as described in environ(7).
The -T option overrides the setting of the TERM environment variable. If neither TERM nor the -T option are present, tabs will fail.
EXIT STATUS
The tabs utility exits 0 on success, and >0 if an error occurs.
SEE ALSO
expand(1), stty(1), tput(1), unexpand(1), termcap(5)
STANDARDS
The tabs utility conforms to IEEE Std 1003.1-2001 (``POSIX.1'').
HISTORY
A tabs utility appeared in PWB UNIX. This implementation was introduced in FreeBSD 5.0.
BUGS
The current termcap(5) database does not define the 'ML' (set left soft margin) capability for any terminals.
BSD
May 20, 2002 BSD