10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi I want to read a text file and replace various number of spaces between each string in to a single "," or any other character .Please let me know the command to do so. My input file is a txt file which is the output of a SQL table extract so it contains so many spaces between each column of the... (2 Replies)
Discussion started by: Hari Prasanth
2 Replies
2. Shell Programming and Scripting
Hi all, I am trying to create a script to read my Windows UUIDs and create mounts in fstab. I know there are different and maybe even better ways to mount Windows partitions at boot time, but I always manually create them in fstab successfully. I do a clean install of Ubuntu often and would like to... (2 Replies)
Discussion started by: Ian Pride
2 Replies
3. Shell Programming and Scripting
Well here is my question.
Let's say I have this Script:
find /var/mobile/ maxdepth -2 name "$x" >> /"$x".txt
The thing is I want to repeat this script and pull out a variable from a text file like this (each line = new variable $x and another run of the whole command)
Thanks for... (27 Replies)
Discussion started by: pasc
27 Replies
4. Shell Programming and Scripting
Hi all,
One of my txt file has common format like . And I need to manually assign variable to "/a/b/c/file1/txt" , which has common text before "Calculated summary file:".
I wonder if I can use some command to do that for me, that it read the file and check for that comonn text and assign... (2 Replies)
Discussion started by: emily
2 Replies
5. UNIX for Dummies Questions & Answers
Hi
New at this, but want to learn more.
I'm trying this as an Shell Command in MacOSX;
newdate='<TIME>'
echo $newdate >> /Users/ttadmin/Desktop/test.txt
And it don't work. But if I just use;
echo <TIME> >> /Users/ttadmin/Desktop/test.txt
(<TIME> is an variable that one program... (6 Replies)
Discussion started by: jackt
6 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 have written a script to retrieve phone numbers from an error log and output the phone numbers into an text file. I then use the list of phone numbers to process each value into a variable so I can run a sql query and update the database. My problem is I can only process the first value... (2 Replies)
Discussion started by: rdr411
2 Replies
8. Shell Programming and Scripting
I have two text files, each of then only containing ONE line and NO carraige return or white space at the end...how do I echo both of these text files to the screen without putting an extra line? I want to do this from the command line.
file1.txt:
this is file1.txt 1
file2.txt:
this is... (4 Replies)
Discussion started by: ajp7701
4 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I have already read a lot of posts on sending attachments in unix...but none of them were of help for my problem...so here goes..
i wanna attach a text file and send to a mail id..used the following code :
uuencode "$File1" "$File1" ;|mail -s "$Mail_sub" abc@abc.com
it works... (2 Replies)
Discussion started by: ash22
2 Replies
10. UNIX for Dummies Questions & Answers
Hi Guru's,
I need to create 3 files with the contents "ABC" using single command.
Iam using:
echo "ABC" > file1.txt file2.txt file3.txt
the above command is not working. pls help me...
With Regards / Ganapati (4 Replies)
Discussion started by: ganapati
4 Replies