Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. tradntele

    counting characters

    So I get the length of each line, but some of the lines seem to be too long... I get the following message... nawk: input record `textofline...' too long input record number 32840, file /directory/filename source line number 1 So the script stops running at that record. What is the character...
  2. tradntele

    counting characters

    I have a text file and I'd like to count the number of characters in each line. Ultimately, I want to sum up the number of lines by how many characters are in it, but first how do you get a count per line?
  3. tradntele

    loop to replace repeating characters

    I have a file that has repeating commas and I'd like to replace them with a single comma (effectively, creating a csv file). The challenge is that there can be an infinite number of repeating commas. For example, field1,field2 field1,,field2 field1,,,,,,,,,field2 So how can I do the...
  4. tradntele

    escaped characters in sed

    Trying to use one sed command to delete the following 3 characters "[] Tried... sed "s/[\"\[\]]//g" filename It did not work, but when I just include 2 of these escaped characters in the set, it works fine. Any ideas?
  5. tradntele

    search and replace syntax in vi

    duh! thanks.
  6. tradntele

    search and replace syntax in vi

    I have a text file with spaces. In vi, I want to search and replace the spaces with a tab character... what is the correct syntax? I tried the following in command mode, which just replaced the spaces with a "t". :%s/ /\t/g
  7. tradntele

    mailx recipient limit and bcc

    I have a mailx script that emails a text message to about 50 recipients. Is there a limit that I should be aware of? Also, I can't seem to get the -b option (blind carbon copy) to work. The only options I need are -s for the subject, -b, and then the main recipient's email address. What's the...
  8. tradntele

    mailx works manually, not in crontab

    Thanks Alex. But I do assign the values of the variables earlier in the same script. Wouldn't that make the variables available while in crontab? Or are you saying I have to "hard code" in the path and file names when using crontab?
  9. tradntele

    mailx works manually, not in crontab

    My shell script wc's a few files (stands for word count, right?) and uses mailx to put the results in the body of an email. It works perfectly when invoked manually at the command line, however, after setting up the same script in crontab, the body of the resulting email comes out blank. The...
  10. tradntele

    ftp script using cat

    Disregard... figured it out... the script was basically looking in the wrong directory for the cat file. Who would've thought you had to look in the right place!
  11. tradntele

    ftp script using cat

    Need help troubleshooting why my ftp script doesn't work. Previous threads suggested a script like the following to ftp a file that has a filename with yesterday's date. First, this 11:59pm script creates a file with the appropriate date... date +%m-%d-20%y > /sasuser/leexjx4/prod/yday.txt...
  12. tradntele

    crontab "end of line" error

    I just get the standard end of line "$" marker after each line and then a final one at the end... 0 1 * * 1 volumes.sh$ 0 5 * * * mc.sh$ $ I seem to recall something about that final line being needed (or maybe it was not needed?) but I've tried both and still nothing.
  13. tradntele

    crontab "end of line" error

    If I swap them around, mc.sh still doesn't work, so I guess the order doesn't matter. I copied this script from the volumes.sh script that does run which is why I'm thinking it's a crontab issue, not a script issue. Any other ideas? Am I neglecting something fundamental?
  14. tradntele

    crontab "end of line" error

    I have the following crontab file 0 1 * * 1 volumes.sh 0 5 * * * mc.sh and it results in "Your crontab file has an error in it... unexpected end of line". The first runs fine, but the second doesn't (the scripts are not the problem). What am I missing here?!!

Part and Inventory Search

Back
Top