Sponsored Content
Full Discussion: Having issues with cat
Top Forums Shell Programming and Scripting Having issues with cat Post 302544271 by Xterra on Wednesday 3rd of August 2011 10:12:42 AM
Old 08-03-2011
Sorting

The problem is that file block1.dis is not being recognized as the firts file:
Code:
ls -sort *.dis

Output:
Quote:
4 -rw-r--r-- 1 jiv9 1 2011-08-03 09:42 block2.dis
4 -rw-r--r-- 1 jiv9 1 2011-08-03 09:42 block3.dis
4 -rw-r--r-- 1 jiv9 1 2011-08-03 09:43 block4.dis
4 -rw-r--r-- 1 jiv9 1 2011-08-03 09:43 block5.dis
4 -rw-r--r-- 1 jiv9 1 2011-08-03 09:43 block6.dis
4 -rw-r--r-- 1 jiv9 1 2011-08-03 09:44 block7.dis
4 -rw-r--r-- 1 jiv9 1 2011-08-03 09:44 block8.dis
4 -rw-r--r-- 1 jiv9 1 2011-08-03 09:44 block9.dis
4 -rw-r--r-- 1 jiv9 2 2011-08-03 09:58 block10.dis
4 -rw-r--r-- 1 jiv9 3 2011-08-03 09:59 block1.dis
4 -rw-r--r-- 1 jiv9 7 2011-08-03 09:59 block11.dis
What should I do to force the code to recognize the file block1.dis to be the first one?
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Cat and vi query

Hi experts, I have a log file, i tried to see it with cat abc.log|pg. Since it has lacs of rows, I wanted to know how can i navigate to a particular date row. Also with vi how can I navigate. Thanks in advance (1 Reply)
Discussion started by: shaan_dmp
1 Replies

2. UNIX for Dummies Questions & Answers

newbie need help on cat

1. what do the following commands do (give logic and concise description) a. cat 1> file-A 2> file-B 0< file-C b. cat 2> file-B 0< file-C 1> file-A c. cat 1> file-A 0< file-C 2>&1 d. cat 0<file-C | sort 1> file-A 2> /dev/null e. cat 2> file-B 0< file-C | sort 1> file-A 2> /dev/null (1 Reply)
Discussion started by: chitti76
1 Replies

3. 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

4. Shell Programming and Scripting

for i in `cat myname.txt` && for y in `cat yourname.txt`

cat myname.txt John Doe I John Doe II John Doe III ----------------------------------------------------------------------- for i in `cat myname.txt` do echo This is my name: $i >> thi.is.my.name.txt done ----------------------------------------------------------------------- cat... (1 Reply)
Discussion started by: danimad
1 Replies

5. 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

6. UNIX for Dummies Questions & Answers

for cat help

Hi there, I have the following problem. I have a csv file which looks like 'AGI,ABJ,Y,Y,Y,None,EQUATION,ANY,ANY,None,' 'AGI,ABJ,Y,Y,Y,None,EQUATION HEAVY,ANY,ANY,None,' 'AGI,ABJ,Y,Y,Y,None,VARIATION,ANY,ANY,None,' but I do this for ab in $(cat test.csv); do echo $ab; done in the... (4 Replies)
Discussion started by: sickboy
4 Replies

7. UNIX for Dummies Questions & Answers

Cat Help needed

Hi, I am unable to use a basic script in cygwin. Please help me out. Script used : #!/bin/bash echo "Lucent MSC1" echo "===========" echo "Orig_MSCID Summary Top 10" cat k1.txt | grep -i orig_mscid | sort | uniq -c echo "Hourly Summary" cat k1.txt | grep "#" | cut -c 10-11 | uniq... (7 Replies)
Discussion started by: vanand420
7 Replies

8. UNIX for Dummies Questions & Answers

Cat and variables

I've been having trouble with cat and variables. If I do the following: var1=filex cat $var1 I get the contents of the file named filex If I do var2="X-0101\ 2-10-2013.txt" cat "$var2" I get cat : cannot open X-0101\ 2-10-2013.txt. I have tried to do cat $var2 without quotes as... (8 Replies)
Discussion started by: newbie2010
8 Replies

9. UNIX for Dummies Questions & Answers

Cat with << >>

Hi, When I was analyzing the code I got below line. cat - << 'EOF' >> ${FILE PATH} I surfed net to understand but I couldn't get what is about. Please help me out. (2 Replies)
Discussion started by: stew
2 Replies
dis(1)								   User Commands							    dis(1)

NAME
dis - object code disassembler SYNOPSIS
dis [-onqCLV] [-d sec] [-D sec] [-F function] [-l string] [-t sec] file... DESCRIPTION
The dis command produces an assembly language listing of file, which can be an object file or an archive of object files. The listing includes assembly statements and an octal or hexadecimal representation of the binary that produced those statements. OPTIONS
Options are interpreted by the disassembler and can be specified in any order. The following options are supported: -C Displays demangled C++ symbol names in the disassembly. -d sec Disassembles the named section as data, printing the offset of the data from the beginning of the section. -D sec Disassembles the named section as data, printing the actual address of the data. -F function Disassembles only the named function in each object file specified on the command line. The -F option can be specified mul- tiple times on the command line. -l string Disassembles the archive file specified by string. For example, one would issue the command dis -l x -l z to disassemble libx.a and libz.a, which are assumed to be in LIBDIR. This option is obsolete and might be removed in a future release of Solaris. -L Invokes a lookup of C-language source labels in the symbol table for subsequent writing to standard output. This option is obsolete and might be removed in a future release of Solaris. -n Displays all addresses numerically. Addresses are displayed using symbolic names by default. -o Prints numbers in octal. The default is hexadecimal. -q Quiet mode. Does not print any headers or function entry labels. -t sec Disassembles the named section as text. -V Prints, on standard error, the version number of the disassembler being executed. This option is obsolete and might be removed in a future release of Solaris. If the -d, -D, or -t options are specified, only those named sections from each user-supplied file is disassembled. Otherwise, all sections containing text is disassembled. On output, a number enclosed in brackets at the beginning of a line, such as [5], indicates that the break-pointable line number starts with the following instruction. These line numbers is printed only if the file was compiled with additional debugging information, for example, the -g option of cc(1B). An expression such as <40> in the operand field or in the symbolic disassembly, following a relative dis- placement for control transfer instructions, is the computed address within the section to which control is transferred. A function name appears in the first column, followed by () if the object file contains a symbol table. OPERANDS
The following operand is supported: file A path name of an object file or an archive (see ar(1)) of object files. ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of dis: LC_CTYPE, LC_MESSAGES, and NLSPATH. LIBDIR If this environment variable contains a value, use this as the path to search for the library. If the variable contains a null value, or is not set, it defaults to searching for the library under /usr/lib. EXIT STATUS
The following exit values are returned: 0 Successful completion. >0 An error occurred. FILES
/usr/lib default LIBDIR ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWbtool | +-----------------------------+-----------------------------+ |Interface Stability |See below. | +-----------------------------+-----------------------------+ The human readable output is Unstable. The command line options are Evolving. SEE ALSO
ar(1), as(1), cc(1B), ld(1), a.out(4), attributes(5), environ(5) DIAGNOSTICS
The self-explanatory diagnostics indicate errors in the command line or problems encountered with the specified files. SunOS 5.11 28 Jun 2007 dis(1)
All times are GMT -4. The time now is 01:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy