Having trouble with My Bash Script, need Help debugging


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Having trouble with My Bash Script, need Help debugging
# 8  
Old 12-19-2012
No . has the same inode number as the directory and .. has the same inode as the parent directory.

Code:
$ ls -id .
45056 .
$ mkdir trial_dir
$ ls -id trial_dir
73759 trial_dir
$ cd trial_dir
$ ls -1ia .
73759 .
45056 ..

# 9  
Old 12-20-2012
Yes, two real entries with two real inodes' numbers, unlike meta-symbols like ~ that are expanded by the shell. The inode numbers get a bit funny where there is a mount point, though, and apparently the odd ones are faked by the O/S or file system driver software!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Grep trouble in Bash

PH=(6H 0 0 JD 9S 0 KD 0) #input from .txt file In the above array, I am trying to get the computer to tell me at what indices the non-zeros are at. I don't understand why this doesn't work... grep -v -b "0" ph.txt > position.txt Isn't grep -v supposed to show non matches in Bash?... (2 Replies)
Discussion started by: cogiz
2 Replies

2. Shell Programming and Scripting

Shell script debugging

hi all only the weirdest thing happened with me just now. I was debugging a shell script and I found that a step that was supposed to execute later was getting executed prior to another step for no reason. You know any ? i mean have a look at the following command- here it tries to grep... (7 Replies)
Discussion started by: leghorn
7 Replies

3. Homework & Coursework Questions

Linux/UNIX Bash Shell Script trouble help needed!!

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 2. Shell Bash Script 3. !/bin/bash if echo no directory then mkdir -p /home/AC_Drywall elif ; then echo "$dir already exist" fi (4 Replies)
Discussion started by: TomFord1
4 Replies

4. Shell Programming and Scripting

Trouble with passing Variable from bash to awk gsub command

Would really appreciate it if someone could point out my mistake in this line of code, i've been staring blankly at it trying everything i can think of some time now and coming up with nothing. #!/bin/bash echo "Enter Username" read Username awk -F: -v var=${Username} '/^var:/... (9 Replies)
Discussion started by: Nostyx
9 Replies

5. Shell Programming and Scripting

Quoting issue: Trouble with bash strings in script

I can do this on the command line: sqsh -S 192.168.x.x -o tmp -U user -P fakepass -D horizon -C "\ select second_id from borrower where btype like '%wsd%' " I can also just leave the SQL at the end intact on one line .... ... However, when I throw this in a script like: $SQSH -o... (4 Replies)
Discussion started by: Bubnoff
4 Replies

6. Shell Programming and Scripting

Bash Script: Trouble unable to run

I am trying to create a menu, and the script fails on ln 38 (Files in pwd). Any idea on where the problem is?? Thanks for the help Rob #!/bin/bash # Cool Script for Weekly Assignment 2 (#3) that creates a menu to act as a ui # and run some popular commands. clear while : do ... (9 Replies)
Discussion started by: rchirico
9 Replies

7. UNIX for Advanced & Expert Users

debugging an already running bash script

# ps -ef | grep rc root 13903 1 0 08:56 ? 00:00:00 /usr/sbin/automount --timeout=60 /archive file /etc/auto_archive root 10706 1 0 08:55 ? 00:00:00 /bin/bash /etc/rc.d/rc 3 root 2933 20071 0 19:38 pts/1 00:00:00 grep rc Is there any way to debug the... (1 Reply)
Discussion started by: marcpascual
1 Replies

8. Shell Programming and Scripting

script debugging

is there any way you can add a breakpoint in a script so you can stop on it? i have used -xv in my shebang but the script just runs and i want it to stop at a specific point in the script. appreciate any help. (1 Reply)
Discussion started by: npatwardhan
1 Replies

9. Shell Programming and Scripting

debugging a script??

Hi all, Am working on a script to understand the flow control of it.. Since i am from a C background i looking out for an easy way to analyze the script as it runs .. In C/C++ we have F7 that starts execution from main() and proceeds accordingly.. I was wondering if there is a same approach... (2 Replies)
Discussion started by: wrapster
2 Replies

10. Shell Programming and Scripting

debugging in bash!!! help needed

Hi all, Am using bash shell. Am newbie, trying to understand the debugin process of a shell script... I am unable to comprehend the control flow ,meaning from where exactly the execution of the script begins... I tried using bash-xv <scriptname> but since am new ,am finding it difficult to... (2 Replies)
Discussion started by: wrapster
2 Replies
Login or Register to Ask a Question