syntax

How do I check whether a directory is empty or not under Linux / UNIX using a TCSH / C shell script?

{ 0 comments }

How do I count and print particular character (say D or digit 7) in a string or variable under Bash UNIX / Linux shell?

{ 7 comments }

How do I open a text file using VIM or VI and go to specific line? How do I open a file using vim and go to specific function() in my source code?

{ 6 comments }

How do I use export command under Linux or Unix like operating systems to set variables?

{ 1 comment }

I have a file of that looks as follows:

foo bar
tom jerry
UNIX Linux

Each word and/or Linux is a different length. How do strip or remove the last character from each line using bash or ksh shell only?

{ 3 comments }

How do I copy a file with Colon (punctuation) name in it. When I type the following command to copy “file:name.txt” to a remote host called server1:

scp file:name.txt user@server1:/path

I get the following error:

ssh: Could not resolve hostname s: Name or service not known

How do I copy file with scp or rsync with a colon in it?

{ 11 comments }

How do I pause for 5 seconds or 2 minutes in my bash shell script?

{ 2 comments }