10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi, I'm new here and this is my first post. I used command line Unix at work for 3 years... about 10 years ago! Now I can't figure out nor hunt down examples of how to do the following:
Say I built a list of file to backup like this:
find ~ -name "*.pdf" -print >> MYPDF.txt
So I am using find... (6 Replies)
Discussion started by: hwilliam777
6 Replies
2. UNIX for Beginners Questions & Answers
Hi All,
I have a filelist which contains the "ls" output, i want to extract the filenames written in this files based on date. I know i can run loop and extract the file but i want to avoid it. also there is find command which can be used on directory i.e.
find . -type f -newermt "2019-09-25"... (3 Replies)
Discussion started by: kumarinfa
3 Replies
3. Shell Programming and Scripting
Hi dears
i have text file like this:
INPUT.txt
001_1_173 j nuh ]az
001_1_174 j ]esma. nuh ]/.xori
.
.
. and have another text
like this
TABLE.txt
j j
nuh word1... (6 Replies)
Discussion started by: alii
6 Replies
4. UNIX for Dummies Questions & Answers
Hi everyone, so I have a script create a login file to log into the sftp remote server, go to a certain directory and get the list of files in that direction into a text file in another folder (local folder). Here is the piece of code
echo "#!/usr/local/bin/expect -f" >>... (5 Replies)
Discussion started by: warmboy610
5 Replies
5. UNIX for Dummies Questions & Answers
I have a diff command that does what I want but when comparing large text/log files, it uses up all the memory I have (sometimes over 8gig of memory)
diff file1.txt file2.txt | grep '^<'| awk '{$1="";print $0}' | sed 's/^ *//'
Is there a better more efficient way to find the lines in one file... (5 Replies)
Discussion started by: raptor25
5 Replies
6. Shell Programming and Scripting
I have a file with a single filename in it, which I want to assign to a BASH variable, so I've been trying:
c=$(head -1 somefile)
echo $c
which outputs correctly, but them when I do
...
somecommand $c
it says it can't find the file, is that because it's grabbing the whole line, and... (5 Replies)
Discussion started by: unclecameron
5 Replies
7. Shell Programming and Scripting
Hi,
I am having trouble getting a combination of commands to work.
I need to traverse through all sub-directories of a certain directory and 'cat' the contents of a particular file in the sub-directories.
The commands on their own work but when I combine them I get no output.
The... (4 Replies)
Discussion started by: DownunderDave
4 Replies
8. Shell Programming and Scripting
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
9. Shell Programming and Scripting
Hi, hopefully this is a fairly simple Q&A.
I have a clean file list of approximately 180 filenames with no directory or slashes in front of the filename nor any extension or dot ".". I would like to read from this list, find these files recursively down through directory trees, copy the files... (1 Reply)
Discussion started by: fxvisions
1 Replies
10. Shell Programming and Scripting
Hai I just want to find a file *.txt in particular direcotry and display the file name puls the content. Do someone know hot to do this, thanks.
I try :
find test/ -name '*.txt' | xargs cat
but It does'nt print out the file name, i want something below print out in my screen :
test/1.txt... (4 Replies)
Discussion started by: asal_email
4 Replies