Skip to content

Tag: shell

Why count differs between ls and ls -l linux command?

I had a directory with number of files and need to check the count of files present in it. I tried the following two commands: and found there are differences while using both commands. (ie. number of files is greater in the usage of second command while comparing to the first command.) I would like to know t…

Pass argument to awk inside do loop

I have a large number of tab-separated text files containing a score I’m interested in in the second column: test_score_1.txt test_score_2.txt I want to check if I have Titles with a score smaller than a number I define. The following code defines my score in the script and works: check_score_1 If I try…

Gnu sort: stray characters in field specification

sort doesn’t seem to like my key specification. Why? From the man page: -k, –key=KEYDEF : sort via a key; KEYDEF gives location and type KEYDEF is F[.C][OPTS][,F[.C][OPTS]] for start and stop position, where F is a field number and C a character position in the field; both are origin 1, and the st…

Handling Dates in FTP

Here is my ftp script The output of this script is: I googled and seen some posts regarding dates but all provided formats not worked for me. Please advise Thanks in anticipation Answer through to FTP, which can include executing commands, substituting variables, and the like. That is to say, instead of writi…