Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Help understanding what this ls -l command is checking in a script Post 303039854 by Corona688 on Wednesday 16th of October 2019 11:20:14 AM
Old 10-16-2019
Quote:
Originally Posted by MadeInGermany
In a standard shell the status variable is $?
In csh it is $status.
bash is a standard shell, and also has $status as a synonym for $?
Code:
tyler@gentoo ~ $ echo $SHELL
/bin/bash
tyler@gentoo ~ $ echo $status

tyler@gentoo ~ $ echo $?
0
tyler@gentoo ~ $

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Need help understanding script command

We use a UNIX-based system (Lawson) at work and I was given this command to request a data extract from the db admin. The only thing I really understand is the last line as it appears to be joining the files created from the first three lines into one. Is there anyone who can help me breakdown the... (4 Replies)
Discussion started by: KGee
4 Replies

2. Shell Programming and Scripting

understanding the sed command

Guys, I am trying to understand the sed command here. adx001 $ a=/clocal/dctrdata/user/dctrdat1/trdroot/recouncil adx001 $ b=`echo $a | sed 's/\//\\\\\//g'` adx001 $ echo $b \/clocal\/dctrdata\/user\/dctrdat1\/trdroot\/recouncil The sed command i took it from the script. Please... (3 Replies)
Discussion started by: mac4rfree
3 Replies

3. Shell Programming and Scripting

understanding the kill command

Hi Guys, I like to know if i have a process which triggers 10 different child processes. How to identify out of the 11 processes running which is the parent process and what are the child process? And if i kill the parent process will the child process be killed.. if not is there a way to... (2 Replies)
Discussion started by: mac4rfree
2 Replies

4. Shell Programming and Scripting

understanding mv command

hi i was moving a file from one directory to another with the following cmmand mv /home/hsghh/dfd/parent/file.txt . while doing so i i accidently mv /home/hsghh/dfd/dfd . although i gave ctrl c and terminate the move command some of the file are missing in the parent directory and... (1 Reply)
Discussion started by: saravanan71184
1 Replies

5. Solaris

Understanding 'du' command

Hi I have a questions related 2 commands : 'du' and 'ls'. Why is the difference between output of 'du' and 'ls' cmd's ? Command 'du' : ------------------ jakubn@server1 /home/jakubn $ du -s * 4 engine.ksh 1331 scripts 'du -s *' ---> shows block count size on disk (512 Bytes... (5 Replies)
Discussion started by: presul
5 Replies

6. Shell Programming and Scripting

Understanding 'find' command

I want to understand what does this command do:confused::confused: find . \( -type f -o -type 1 \) Plz someone explain me ! Thanks much in advance!! (2 Replies)
Discussion started by: sears
2 Replies

7. UNIX for Dummies Questions & Answers

understanding sed command

Hi Friends, I need a small help in understanding the below sed command. $ cat t4.txt 1 root 1 58 0 888K 368K sleep 4:06 0.00% init 1 root 1 58 0 888K 368K sleep 4:06 0.00% init last $ sed 's/*$//' t4.txt 1 root 1 58 0 888K ... (3 Replies)
Discussion started by: forroughuse
3 Replies

8. UNIX for Advanced & Expert Users

Checking missing data's sequence (shell script | UNIX command)

Dear All members, i have some trouble here, i want to ask your help. The case is: I have some data, it's like: -ABCD1234 -ABCD1235 -ABCD1237 -BCDE1111 -BCDE1112 -BCDE1114 there is some missing data's sequence (the format is: ABCD = name 1234 = sequence). I want to print the... (2 Replies)
Discussion started by: septian.tri
2 Replies

9. Shell Programming and Scripting

awk : Need Help in Understanding a command

Hello I am working on a Change request and Stuck at a point. The below awk command is used in the function. float_test ( ) { echo | awk 'END { exit ( !( '"$1"')); }' } I understand that awk 'END' is used to add one line at the end and exit is used to end the script with an error... (4 Replies)
Discussion started by: rahul2662
4 Replies

10. Shell Programming and Scripting

Command script for checking a file existence

Hello, I have a directory where sometimes appear a certain file name - and I'd like to be notified by email when that happens... so what command or script I may use? e.g. if there's a file named "adam" in the directory named "dir1" then send a mail to "abc@abc.com".. it needs to permanently... (5 Replies)
Discussion started by: netrom
5 Replies
SCANELF(1)						    Documentation for pax-utils 						SCANELF(1)

NAME
scanelf - user-space utility to scan ELF files SYNOPSIS
scanelf [options] ELFs or directories DESCRIPTION
scanelf is a user-space utility to quickly scan given ELFs, directories, or common system paths for different information. This may include ELF types, their PaX markings, TEXTRELs, etc... OPTIONS
-A, --archives Scan archives (.a files) -a, --all Print all useful/simple info -B, --nobanner Don't display the header -b, --bind Print symbol binding information (lazy or now) -D, --endian Print ELF endianness (big/little/...) -E, --etype ETYPE Print only ELF files matching specified etype (like ET_DYN, ET_EXEC, etc...) -e, --header Print GNU_STACK markings -F, --format FORMAT Use specified format for output; see the FORMAT section for more information -f, --from FILE Read input stream from specified filename -g, --gmatch Use strncmp to match libraries (use with -N). Or regexp with symbol matching -h, --help Show condensed usage and exit -I, --osabi Print OSABI -i, --interp Print the interpreter information (.interp/PT_INTERP) -k, --section SECTION Find ELFs with the specified section -L, --ldcache Utilize ld.so.cache information (use with -r/-n) -l, --ldpath Scan all directories in /etc/ld.so.conf -M, --bits BITS Print only ELF files matching specified numeric bits (like 32/64) -m, --mount Don't recursively cross mount points -N, --lib SONAME Find ELFs that need the specified SONAME -n, --needed Print libraries the ELF is linked against (DT_NEEDED) -O, --perms PERMS Print only ELF files with matching specified octal bits (like 755) -o, --file FILE Write output stream to specified filename -p, --path Scan all directories in PATH environment -q, --quiet Only output 'bad' things -R, --recursive Scan directories recursively -r, --rpath Print runpaths encoded in the ELF (DT_RPATH/DT_RUNPATH) -S, --soname Print the ELF's shared library name (DT_SONAME) -s, --symbol SYMBOL Find the specified symbol; see SYMBOL MATCHING for more info -T, --textrels Locate cause of TEXTRELs via objdump -t, --textrel Print TEXTREL information -V, --version Print version and exit -v, --verbose Be verbose (can be used more than once) -X, --fix Try and 'fix' bad things (use with -r/-e) -x, --pax Print PaX markings -Y, --eabi Print EABI (only matters for a few architectures) -y, --symlink Don't scan symlinks -Z, --size SIZE Print ELF file size -z, --setpax FLAGS Sets EI_PAX/PT_PAX_FLAGS to specified flags (use with -Xx) FORMAT
The format string is much like a printf string in that it is a literal string with flags requesting different information. For example, you could use a format string and expect the following results. # scanelf -BF "file %f needs %n; funky time" /bin/bash file bash needs libncurses.so.5,libdl.so.2,libc.so.6; funky time Note that when you use a format string, generally information related flags should be omitted. In other words, you do not want to try and request NEEDED output (-n) and try to specify a format output at the sametime as these operations are mutually exclusive. Each information related flag has an equivalent conversion specifier, so use those instead. You can of course continue to use non-information related flags (such as --verbose). There are three characters that introduce conversion specifiers. o % - replace with info o # - silent boolean match o + - verbose match And there are a number of conversion specifiers. We try to match up the specifier with corresponding option. o a - machine (EM) type o b - bind flags o e - program headers o D - endian o I - osabi o Y - eabi o F - long filename o f - short filename o i - interp o k - section o M - EI class o N - specified needed o n - needed libraries o p - filename (minus search) o o - etype o O - perms o r - runpaths o S - SONAME o s - symbol o T - all textrels o t - textrel status o x - pax flags SYMBOL MATCHING
A - prefix will only show undefined references while a + prefix will only show defined references while no prefix will show both. ELF ETYPES
You can narrow your search by specifying the ELF object file type (ETYPE). The commandline option takes the numeric value and or symbolic type. Multiple values can be passed comma separated. Example -E ET_EXEC,ET_DYN,1 Here is the normal list available for your pleasure. You of course are free to specify any numeric value you want. o 0 - ET_NONE - unknown type o 1 - ET_REL - relocatable file o 2 - ET_EXEC - executable file o 3 - ET_DYN - shared object o 4 - ET_CORE - core file ELF BITS
You can also narrow your search by specifying the ELF bitsize. Again, specify the numeric value or the symbolic define. o 32 - ELFCLASS32 - 32bit ELFs o 64 - ELFCLASS64 - 64bit ELFs HOMEPAGE
http://hardened.gentoo.org/pax-utils.xml REPORTING BUGS
Please include as much information as possible (using any available debugging options) and send bug reports to the maintainers (see the AUTHORS section). Please use the Gentoo bugzilla at http://bugs.gentoo.org/ if possible. SEE ALSO
chpax(1), dumpelf(1), paxctl(1), pspax(1), readelf(1), scanelf(1) AUTHORS
Ned Ludd <solar@gentoo.org> Maintainer Mike Frysinger <vapier@gentoo.org> Maintainer Fabian Groffen <grobian@gentoo.org> Mach-O Maintainer NOTES
1. http://hardened.gentoo.org/pax-utils.xml 2. http://bugs.gentoo.org/ pax-utils 0.2.3 03/03/2011 SCANELF(1)
All times are GMT -4. The time now is 08:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy